Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula to show cursor's whereabouts



Can anybody tell me what is the formula/function to define into a cell,
to show result of a cursor's location/whereabouts?

Example: If I move the cursor to cell B2, then the formula (let's say
at cell A1) should return "B2". If I move the cursor up 1 cell to B1,
then A1 should show "B1".


--
Manunc
------------------------------------------------------------------------
Manunc's Profile: http://www.excelforum.com/member.php...o&userid=19917
View this thread: http://www.excelforum.com/showthread...hreadid=345842

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Formula to show cursor's whereabouts

The cursor (the arrow) is not the same as the activecell, since you can and
usually do move your cursor around the screen while the active cell remains
unchanged. That being said, it sounds like what you want is to know which
cell is the currently ActiveCell. The following code will place the address
of the activecell (or the upper left cell of a selected range) in Range A1
and will update whenever a new cell is selected.

This code goes in the Sheet Object of whichever sheet you want. Write back
if you need help finding where it goes.

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

"Manunc" wrote:



Can anybody tell me what is the formula/function to define into a cell,
to show result of a cursor's location/whereabouts?

Example: If I move the cursor to cell B2, then the formula (let's say
at cell A1) should return "B2". If I move the cursor up 1 cell to B1,
then A1 should show "B1".


--
Manunc
------------------------------------------------------------------------
Manunc's Profile: http://www.excelforum.com/member.php...o&userid=19917
View this thread: http://www.excelforum.com/showthread...hreadid=345842


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula to show cursor's whereabouts


Thanks alot Gocush.

You're quite correct, Active Cell is what I've been meaning, not
Cursor.

Could you please tell me where to place the subroutine that you gave
me? I haven't tried this kind before.


--
Manunc
------------------------------------------------------------------------
Manunc's Profile: http://www.excelforum.com/member.php...o&userid=19917
View this thread: http://www.excelforum.com/showthread...hreadid=345842

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Formula to show cursor's whereabouts

Copy the code lines from my above post
Activate the sheet you want to use.
Right click on the Sheet TAB (at the bottom of screen)
click on View Code
Paste code

"Manunc" wrote:


Thanks alot Gocush.

You're quite correct, Active Cell is what I've been meaning, not
Cursor.

Could you please tell me where to place the subroutine that you gave
me? I haven't tried this kind before.


--
Manunc
------------------------------------------------------------------------
Manunc's Profile: http://www.excelforum.com/member.php...o&userid=19917
View this thread: http://www.excelforum.com/showthread...hreadid=345842


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula to show cursor's whereabouts


I already pasted and saved it. Then how do I use this new function?
tried to input in a cell =Worksheet_SelectionChange() but I go
#NAME

--
Manun
-----------------------------------------------------------------------
Manunc's Profile: http://www.excelforum.com/member.php...fo&userid=1991
View this thread: http://www.excelforum.com/showthread.php?threadid=34584



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula to show cursor's whereabouts


Wow Gocush! I just noticed something at A1. Cooool! I think I've
got it, thanks to you! I thought I had to call this function
everytime.


--
Manunc
------------------------------------------------------------------------
Manunc's Profile: http://www.excelforum.com/member.php...o&userid=19917
View this thread: http://www.excelforum.com/showthread...hreadid=345842

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
Formula Bar show the location path file plus the formula Manos Excel Discussion (Misc queries) 1 June 25th 09 08:10 PM
formula to show + or - before the result of an existing formula Jamie Excel Discussion (Misc queries) 3 April 17th 09 07:06 AM
cells show formula like in formula bar, rather than result of form James Irwin Excel Discussion (Misc queries) 2 December 18th 08 04:41 PM
Show and copy values in formula bar containing a formula Timbo Excel Discussion (Misc queries) 2 April 15th 08 10:42 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 09:40 AM.

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

About Us

"It's about Microsoft Excel"