Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Saturday, July 31, 2010 10:01:10 PM UTC+5:30, 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. Function coletter(col As Integer) As String arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" If col 26 Then remainder = col Mod 26 devisor = (col - remainder) / 26 If remainder 0 Then coletter = Mid(arr, devisor, 1) & Mid(arr, remainder, 1) Else coletter = Mid(arr, devisor - 1, 1) & Mid(arr, 26, 1) End If Else coletter = Mid(arr, col, 1) End If End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract Column Letter from Cell Reference in another Cell | Excel Discussion (Misc queries) | |||
How to determine the column letter from Cell address | Excel Worksheet Functions | |||
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) |