![]() |
How to return column number
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 |
How to return column number
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 |
How to return column number
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 |
How to return column number
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 |
How to return column number
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 |
All times are GMT +1. The time now is 06:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com