Thread: Active Cell?
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Active Cell?

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

On Thu, 1 Oct 2009 18:20:01 -0700, tgi
wrote:

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.