#1   Report Post  
Posted to microsoft.public.excel.misc
tgi tgi is offline
external usenet poster
 
Posts: 6
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
KC KC is offline
external usenet poster
 
Posts: 94
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
set the background color of the current cell(active cell) kang New Users to Excel 2 July 31st 07 04:48 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
Active cell village_idiot Excel Discussion (Misc queries) 17 April 19th 07 06:30 PM
value of the active cell caroline Excel Worksheet Functions 2 June 21st 06 05:34 PM
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. ragman10 Excel Discussion (Misc queries) 1 December 14th 04 12:52 AM


All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"