View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
VBA Noob VBA Noob is offline
external usenet poster
 
Posts: 1
Default How to determine the column letter from Cell address


Hi

Not sure if any of these are what your after. The 7 in your reference =
G. Put this formula into B1. Enter 7 and it will return G

=IF(AND(A10,A1<257),IF(A126,CHAR(64+INT((A1-1)/26)),"")&CHAR(65+MOD(A1-1,26)),"")

Or if you want to see headers as a number instead of letters go to
options by


Tools, Options, General, R1C1 Refence style. This changes the letters
to numbers

or if your after VBA code to select active cell

MyColumnNumber = ActiveCell.Column


http://www.vba-programmer.com/Snippe...and_Names.html


VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=564070