Cell Value

New Contributor

Dear all,


I would like to use the content of the active cell in another cell X. So it means that whenever I jump to another active cell, the content should appear in that cell X.

Can that be done in a simple way? 



2 Replies
best response confirmed by allyreckerman (Microsoft)


Let's say that cell X is A1.

Right-click the sheet tab.

Select 'View Code' from the context menu.

Copy the following code into the worksheet module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Me.Range("A1").Value = ActiveCell.Value
End Sub

Switch back to Excel.

Save the workbook as a macro0enabled workbook (.xlsm).

Make sure that you allow macros when you open the workbook.

@Hans Vogelaar 


TXS Hans,


It works well.


Have a nice day.