return the row of any selected cell

  • Thread starter Thread starter kim55
  • Start date Start date
K

kim55

I want to be able to see in a cell the row number of any other currently
selected cell.
 
Namebox not adequate?

Try this UDF if not.

Function WhatCell()
Application.Volatile
WhatCell = ActiveCell.Address
End Function

NOTE: you must force a recalculation before it will update.

F9 key will calculate. Or F2 then Enter


Gord Dibben MS Excel MVP
 
Thanks, Gord, that is a great function and i'm using it but having to
manually recalc is a pain. I'm trying to use conditional formatting in a cell
depending on what other cell is active, so the namebox isn't helpful. That is
unless there is a way to pull the info from the namebox.
 
Maybe some sheet event code?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Range("A1").Value = ActiveCell.Address
End Sub


Gord
 

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