Forum Discussion
Cell Value
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?
TXS
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 SubSwitch back to Excel.
Save the workbook as a macro0enabled workbook (.xlsm).
Make sure that you allow macros when you open the workbook.
2 Replies
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 SubSwitch back to Excel.
Save the workbook as a macro0enabled workbook (.xlsm).
Make sure that you allow macros when you open the workbook.
- karlos_gryspeerdtCopper Contributor