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
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?
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?
RE: how to get from row,col to cell coordinate?
=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?
CODE
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