View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Column index name

Range("Z21").Formula = "Sum(" & Cells(3,c).Resize(10,1).Address & ")"

Generally you don't need the column letter by itself.


However,

Left(columns(c).Address(0,0),1 + -1*(c 26))


from the immediate window:
c = 5
? Left(columns(c).Address(0,0),1 + -1*(c 26))
E
c = 27
? Left(columns(c).Address(0,0),1 + -1*(c 26))
AA

--
Regards,
Tom Ogilvy

"John" wrote in message
...
Dear ALL,

I got a question that maybe a minor one to everyone. but anyway, if I know
the column number, how do I know what "alphabeth letter" refer to it?

E.g.
I know the value c = 5 as referring column 5, but is there a way to return
the column letter "E" instead of 5? Please help since will need to use it
for setting formula inside macro. Many many thanks.

Regards,
John