View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
[email protected] tmcconnell78@googlemail.com is offline
external usenet poster
 
Posts: 1
Default Get Column Letter of Active Cell in VBA

On Thursday, 5 August 2010 04:37:23 UTC+4, James Ravenswood wrote:
On Jul 31, 12:31*pm, MIG wrote:
For some reason, activecell.column returns a number, where as
range.select requires a string.

So it's not possible to, say, select a range based on returning the
current column, or is it?

Is there a way of either

a) returning the column letter or

b) selecting a range based on column number?

Thanks.


To get the letter(s) of the active cell column:

Sub ActiveCellColumnLetter()
MsgBox Split(ActiveCell.Address, "$")(1)
End Sub


Man, you made my day! This is the neatest solution!