×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

how to get from row,col to cell coordinate?

how to get from row,col to cell coordinate?

how to get from row,col to cell coordinate?

(OP)
I've been the net for hours now before posting this questions. The question seems trival, but here we go:

How can I get from a selected or activated cell it's coordinates in the form <characters><number> e.g. "QA23" I does not seem to be in the properties of the Cell, I know one can convert the number 3 into the character 'C' but I was hoping excell as built-in support for it, but I can't seem to find it. thanks for your help.

Alwyn

RE: how to get from row,col to cell coordinate?

In VBA you can use:

Excel.Activecell.Address

This will give you the cell in the form of $(column)$(row), or $QA$23, for example.

Is that what you are looking for?

RE: how to get from row,col to cell coordinate?

(OP)
Thanks that was just it, but it is not in the default properties-list of an active cell that is wy I could find it. problem solved just int ime to start the weekend happy.

RE: how to get from row,col to cell coordinate?

In an excel worksheet you can use the formula

=CELL("ADDRESS",qa23)

As an aside I find CELL("FILENAME",a1) to be very useful, also

RE: how to get from row,col to cell coordinate?

This is one of those annoyances that I ended up writing a function for. I always figured there should be a built-in way to get the alpha reference for the column, but I never could find one. Anyway, here's the function I wrote:

CODE

Public Function GetColumnAlpha(ByRef cell As Range) As String
    
    Dim s       As String
    Dim arr     As Variant
    
    s = cell.AddressLocal(True, False)
    arr = Split(s, "$")
    GetColumnAlpha = arr(0)
    
End Function

The AddressLocal() leaves the SheetName! out of the result. The True and False parameters are for whether you want absolute column and row references (i.e., the dollar $ sign in the address). I leave the absolute reference for the row so I can use it as a split delimeter.

HTH,

Nick Hebb

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources