Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
OB OB is offline
external usenet poster
 
Posts: 5
Default How do i assign cell A1 to show the current cursor cell in Excel?

I am trying to dynamically get the current cell address or the contents of
that cell in to one fixed cell (cell A1). When I move the cursor within the
worksheet, I would like the value of the cell A1 to reflect the new position
of the cursor cell (cell address) or the contents of that cell.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How do i assign cell A1 to show the current cursor cell in Excel?

Put the following in worksheet code:

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

--
Gary's Student


"OB" wrote:

I am trying to dynamically get the current cell address or the contents of
that cell in to one fixed cell (cell A1). When I move the cursor within the
worksheet, I would like the value of the cell A1 to reflect the new position
of the cursor cell (cell address) or the contents of that cell.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default How do i assign cell A1 to show the current cursor cell in Excel?

Paste this into the Sheet Module of the sheet in question:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A1") = Cells(Target.Row, Target.Column).Address(0, 0)
End Sub

You may also want to do a Freeze Pane in Cell A2;

HTH

"OB" wrote:

I am trying to dynamically get the current cell address or the contents of
that cell in to one fixed cell (cell A1). When I move the cursor within the
worksheet, I would like the value of the cell A1 to reflect the new position
of the cursor cell (cell address) or the contents of that cell.

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
need Excel cell to show value, not formula jori Excel Worksheet Functions 4 April 18th 09 05:47 PM
How do I show the address of hyperlink to another cell in Excel ? Outlook写邮件遇到的问题 Excel Discussion (Misc queries) 1 June 7th 06 12:58 PM
How do I show the current Excel filepath in the toolbar line? Rick3789 Excel Discussion (Misc queries) 3 March 9th 06 06:02 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
how do i set up a cell in excel so that it shows the current date mikelove Excel Worksheet Functions 2 May 16th 05 08:12 PM


All times are GMT +1. The time now is 04:05 AM.

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"