Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Jean" skrev i en meddelelse
... Hi, If there a function in VBA that return the column letter from a given cell address ? For example, I need to know the that the column letter for Cell(7,1) is G. Thanks JH Hi Jean One way for Excel 2000 and on: Function GetColumn(Cell As Range) 'Leo Heuser, 23.7.2006 GetColumn = Split(Cell.Address, "$")(1) End Function Sub test() MsgBox GetColumn(Cells(1, 7)) End Sub An example of a worksheet formula would be: =SUBSTITUTE(ADDRESS(1,7,4),1,"") Just replace 7 by the column number. -- Best regards Leo Heuser Followup to newsgroup only please. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
Positioning Numeric Values Resulting from 6 Column Array Formula | Excel Worksheet Functions | |||
creating a bar graph | Excel Discussion (Misc queries) | |||
up to 7 functions? | Excel Worksheet Functions | |||
How do I reference every "n" cell in a column in Excel? | Excel Worksheet Functions |