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  dBforums > PC based Database Applications > Microsoft Excel > retrieving value of clicked cell.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-17-11, 17:08
Steven_t Steven_t is offline
Registered User
 
Join Date: Jun 2011
Posts: 5
Exclamation retrieving value of clicked cell.

Hi,

I need to get the value present in the clicked cell into another cell..
like suppose that in the below calendar

June 2011
S M T W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30


if clicked on day 15, then the value should be displayed in another cell like in D6, in the same way if clicked on day 25 then the value 25 should be displayed in D6, i mean on what ever value we click, it should be displayed in D6. If the solution for this problem is to have a macro is also fine...

Please help me with this... Thanks in advance...

Last edited by Steven_t; 06-20-11 at 09:43. Reason: dint get any replies...
Reply With Quote
  #2 (permalink)  
Old 06-27-11, 08:31
Mowgli212001 Mowgli212001 is offline
Registered User
 
Join Date: Feb 2004
Location: Swindon, UK
Posts: 86
if you build your calendar in cells A2 to G7 for example then add this code to the selection change event for that sheet it will show the clicked value in A1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row >= 3 And Target.Row <= 7 Then
If Target.Column >= 1 And Target.Column <= 7 Then
Range("A1").Value = Target.Value
End If
End If
End Sub
__________________
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done."
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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