Excel question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to click on a cell in excel, and have that value automatically entered into another cell location. Does anyone know how to do this? For example, I have numbers in cells D16 through N18. I would like to click on D16, which contains the number 18, for example, and have that number 18 automatically show up in another cell, lets say C12. Is this possible

Thank you.
 
Tom
Yes. This is done with a Worksheet_ SelectionChange macro. Post back
with more specifics of what you want to do. HTH Otto
Tom said:
I would like to click on a cell in excel, and have that value
automatically entered into another cell location. Does anyone know how to do
this? For example, I have numbers in cells D16 through N18. I would like to
click on D16, which contains the number 18, for example, and have that
number 18 automatically show up in another cell, lets say C12. Is this
possible.
 
Yes, but what's the rule? Specifically, using your example, you can use the
selection_Change event. Right-click the sheet tab, select View Code, enter
this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$16" Then Range("C12").Value = Target.Value
End Sub

Bob Umlas
Excel MVP

Tom said:
I would like to click on a cell in excel, and have that value
automatically entered into another cell location. Does anyone know how to do
this? For example, I have numbers in cells D16 through N18. I would like to
click on D16, which contains the number 18, for example, and have that
number 18 automatically show up in another cell, lets say C12. Is this
possible.
 
i would like to add to toms question.can you have the number automatically change on to sheet 2 c 12 from sheet 1?thanks wyn
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$16" Then Sheets("SheetName").Range("C12").Value
= Target.Value
End Sub
HTH Otto
WYN said:
i would like to add to toms question.can you have the number automatically
change on to sheet 2 c 12 from sheet 1?thanks wyn
 
Back
Top