Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returning the row number 2

Status
Not open for further replies.

Stevo911

Technical User
Apr 26, 2005
33
0
0
ZA
Hi there

I dont think this should be too difficult ...

In Excel, how does one return the row number of the current active cell in the worksheet?

Thanks
 
this should do it

l = ActiveCell.Row



Hope this is of use, Rob.[yoda]
 
This answer only applies if you are trying to code a macro. It does not apply to a situation where you would want to use a user defined function to display the active row number on the worksheet (as in "=ActiveRowFunction()" as the formula in a cell).

Try searching the VBA help with the search term, ActiveCell. ActiveCell acts like any other Range object. To learn more about what properies a cell can have, try adding a watch to a range object like

Code:
Range("A1")

You'd be surprized at all the data a cell actually has...

Hope this helps,
Joseph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top