Active Cell?

  • Thread starter Thread starter tgi
  • Start date Start date
T

tgi

is there a way to tell which cell is active.

say A1 displays the Active cell address.
i know row() and columns() returns that particular row and comumn number, so
what i need is something like ActiveRow() and ActiveColumn()

so in A1 if i write a formula
=address(ActiveRow(), ActiveColumn())
would keep displaying whatever cell you go to.

is there anything similar to this i can do?

thanks in advance.
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A1") = ActiveCell.Address
End Sub

-kc
*Click YES if this works
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Range("A1") = ActiveCell.Address
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the above code into that sheet module.

Alt + q to return to Excel.

If you wanted this for all sheets in a workbook place this code in
Thisworkbook module.

Private Sub Workbook_SheetSelectionChange(ByVal _
Sh As Object, ByVal Target As Range)
ActiveSheet.Range("A1") = ActiveCell.Address
End Sub


Gord Dibben MS Excel MVP
 
Back
Top