How to return column number

  • Thread starter Thread starter moonhk
  • Start date Start date
M

moonhk

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
 
MsgBox ActiveCell.SpecialCells(xlLastCell).Column

Regards,
Stefi

„moonhk†ezt írta:
 
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
 
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







- -

Thank a lot
 
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







- -

Thank a lot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top