How to retrieve Excel column as a string (AAA instead of 703)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I was using GetProperty to retrieve the column on an Excel spreadsheet, but
it returns me the number of column ..

Is there a way I get the corresponding column name, I mean using the letters
instead of the number? (like getting AAA instead of 703, or ZZ instead of
702).
 
Hi Aggie

You can use this function from Chip Pearson

Function ColumnLetter(R As Range) As String
ColumnLetter = Left(R.Address(False, False), _
1 - (R.Column > 26) - (R.Column > 702))
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top