Hi,
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
=currow()
in cell A1, but the formula does not update automatically as I move the active cell around.
- stochastic
the code I wrote:
Public Function currow() As Integer
Application.Volatile
currow = ActiveCell.Row
End Function
Start Free Trial