Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
How to return column number ? I want return 4 not D. Below is my coding, MsgBox ActiveCell.SpecialCells(xlLastCell).Address '~~ $D$6 RowCnt = InStr(2, ActiveCell.SpecialCells(xlLastCell).Address, "$", 0) MsgBox Left(ActiveCell.SpecialCells(xlLastCell).Address, RowCnt - 1) '~~ $D Moonhk |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MsgBox ActiveCell.SpecialCells(xlLastCell).Column
Regards, Stefi €˛moonhk€¯ ezt Ć*rta: Hi All How to return column number ? I want return 4 not D. Below is my coding, MsgBox ActiveCell.SpecialCells(xlLastCell).Address '~~ $D$6 RowCnt = InStr(2, ActiveCell.SpecialCells(xlLastCell).Address, "$", 0) MsgBox Left(ActiveCell.SpecialCells(xlLastCell).Address, RowCnt - 1) '~~ $D Moonhk |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The row and column properties of the range object will return what you need.
ie if the active cell is in D2 then: Activecell.coumn = 4 Activecell.row = 2 "moonhk" wrote: Hi All How to return column number ? I want return 4 not D. Below is my coding, MsgBox ActiveCell.SpecialCells(xlLastCell).Address '~~ $D$6 RowCnt = InStr(2, ActiveCell.SpecialCells(xlLastCell).Address, "$", 0) MsgBox Left(ActiveCell.SpecialCells(xlLastCell).Address, RowCnt - 1) '~~ $D Moonhk |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 11 6 , 7 33 , DomThePom
wrote: The row and column properties of the range object will return what you need. ie if the active cell is in D2 then: Activecell.coumn = 4 Activecell.row = 2 "moonhk" wrote: Hi All How to return column number ? I want return 4 not D. Below is my coding, MsgBox ActiveCell.SpecialCells(xlLastCell).Address '~~ $D$6 RowCnt = InStr(2, ActiveCell.SpecialCells(xlLastCell).Address, "$", 0) MsgBox Left(ActiveCell.SpecialCells(xlLastCell).Address, RowCnt - 1) '~~ $D Moonhk- - - - Thank a lot |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 11 6 , 7 33 , DomThePom
wrote: The row and column properties of the range object will return what you need. ie if the active cell is in D2 then: Activecell.coumn = 4 Activecell.row = 2 "moonhk" wrote: Hi All How to return column number ? I want return 4 not D. Below is my coding, MsgBox ActiveCell.SpecialCells(xlLastCell).Address '~~ $D$6 RowCnt = InStr(2, ActiveCell.SpecialCells(xlLastCell).Address, "$", 0) MsgBox Left(ActiveCell.SpecialCells(xlLastCell).Address, RowCnt - 1) '~~ $D Moonhk- - - - Thank a lot |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return column number from column header text | Excel Discussion (Misc queries) | |||
To return the column number of a string | Excel Worksheet Functions | |||
Return column letter, rather than number? | Excel Programming | |||
Column() to return a letter instead of a number? | Excel Worksheet Functions | |||
Excel - Return column alphabet from column number | Excel Programming |