Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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! Nice..! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Get Column Letter of Active Cell in VBA
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Get Column Letter of Active Cell in VBA | Excel Discussion (Misc queries) | |||
Extract Column Letter from Cell Reference in another Cell | Excel Discussion (Misc queries) | |||
How to replace column letter in refferences with a function using the old column letter? | Links and Linking in Excel | |||
How to replace column letter in refferences with a function using the old column letter? | Excel Worksheet Functions | |||
column header changed from letter to number, how return to letter | Excel Discussion (Misc queries) |