View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Returning column letter

Sorry that one didn't work on Columns with double letters i.e. "AA"
try this one instead
Dim x As Variant
x = Mid(ActiveCell.Columns.Address, 2, WorksheetFunction.Find("$", _
ActiveCell.Columns.Address, 2) - 2)


I think you can avoid the WorksheetFunction call by doing this...

x = Left(ActiveCell.Address(True, False), _
InStr(ActiveCell.Address(True, False), "$") - 1)

Rick