View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
moonhk moonhk is offline
external usenet poster
 
Posts: 62
Default 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