current cell position in Excel
Posted on 2001-09-04
I am looking for a formula that will evaluate the current (active) cell's row number.
For instance, let's say I write this formula in cell A1.
Now when I click on cell B6 (or move to it with arrow keys), cell A1 should show 6. If I go to E10, it should show 10 etc.
Incredible, but I can't find a simple solution. I even wrote VBA code as given below for my function, and wrote the formula
in cell A1, but the formula does not update automatically as I move the active cell around.
the code I wrote:
Public Function currow() As Integer
currow = ActiveCell.Row