A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how to display my cursor cell content in another cell....



 
 
Thread Tools Display Modes
  #1  
Old May 12th, 2009, 09:30 PM posted to microsoft.public.excel.worksheet.functions
dh13134
external usenet poster
 
Posts: 20
Default how to display my cursor cell content in another cell....

hi
is there a function that can display the content of whatever cell my cursor
is currently in? for example, A1="Dog", A2="Cat", and A3="Horse". i want cell
D1 to display "Dog" when my cursor is in cell A1, "Cat" when i move my cursor
to A2, and "Horse" when i move my cursor to A3......
thanks
--
dh13134
  #2  
Old May 12th, 2009, 09:50 PM posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
 
Posts: 6,167
Default how to display my cursor cell content in another cell....

Right click sheet tabview codeinsert this. Now when you select ANY cell it
will show in d1. SO, you may want to restrict by using the second one
instead.

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

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("a1:a10")) Is Nothing Then Exit Sub
Range("d12").Value = Target
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"dh13134" wrote in message
news
hi
is there a function that can display the content of whatever cell my
cursor
is currently in? for example, A1="Dog", A2="Cat", and A3="Horse". i want
cell
D1 to display "Dog" when my cursor is in cell A1, "Cat" when i move my
cursor
to A2, and "Horse" when i move my cursor to A3......
thanks
--
dh13134


  #3  
Old May 12th, 2009, 10:06 PM posted to microsoft.public.excel.worksheet.functions
dh13134
external usenet poster
 
Posts: 20
Default how to display my cursor cell content in another cell....

VERY, VERY, COOL!!!

thanks much!!
--
dh13134


"Don Guillett" wrote:

Right click sheet tabview codeinsert this. Now when you select ANY cell it
will show in d1. SO, you may want to restrict by using the second one
instead.

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

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("a1:a10")) Is Nothing Then Exit Sub
Range("d12").Value = Target
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"dh13134" wrote in message
news
hi
is there a function that can display the content of whatever cell my
cursor
is currently in? for example, A1="Dog", A2="Cat", and A3="Horse". i want
cell
D1 to display "Dog" when my cursor is in cell A1, "Cat" when i move my
cursor
to A2, and "Horse" when i move my cursor to A3......
thanks
--
dh13134



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:31 PM.


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