Thread: mapping columns
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default mapping columns

Not really sure what you want here but perhaps the following will help. The
first 2 return the column number from the alpha id and the second 2 return
the column alpha id from the column number. Returning the Address (alpha id)
the parameters indicate whether to return absolute or relative. ,0 is
relative and 1 (or no parameter) returns absolute.

Sub test()

MsgBox Columns("AA").Column
MsgBox Columns("F").Column

MsgBox Columns(27).Address(, 0) 'Relative
MsgBox Columns(6).Address(, 1) 'Absolute
MsgBox Columns(6).Address() 'Absolute

End Sub

--
Regards,

OssieMac


"Farooq Sheri" wrote:

Greetings

Is there a way to map column number to alphabet such column 6 equates to "F"
and column equates to AA.

Thanks