Make a cell reflect the content of whatever other cell

edge37

Board Regular
Joined
Sep 1, 2016
Messages
105
Office Version
  1. 365
Platform
  1. Windows
Hello, I need to use a VLOOKUP formula and I require to define one cell that reflects the content of any other cells when I click on them. Example: if cell A1 has a name: ARTHUR, I need that same name to appear in the reflecting cell, if I click on cell A2 with JOHN, it now gets reflected in that same cell, etc.

Thanks in advance
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
It would require VBA -- you good with that?

EDIT: Also, it would kill Undo, which is a pretty high price, IMO.
 
Last edited:
Upvote 0
Im not good with VBA. Can you give me a hint on what to do? Thanks
 
Upvote 0
In the worksheet module,

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  With Target(1)
    If Not IsEmpty(.Cells) Then Range("F2").Value = .Value
  End With
End Sub

Change F2 to wherever you want the result to appear.
 
Upvote 0
That should be

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  With Target.Cells(1)
    If Not IsEmpty(.Cells) Then Range("F2").Value = .Value
  End With
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,225,522
Messages
6,185,465
Members
453,296
Latest member
zashue22

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top