![]() |
Active Cell?
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. |
Active Cell?
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("A1") = ActiveCell.Address End Sub -kc *Click YES if this works "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. |
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. |
All times are GMT +1. The time now is 09:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com