Forum Discussion

karlos_gryspeerdt's avatar
karlos_gryspeerdt
Copper Contributor
Aug 24, 2021
Solved

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 don...
  • HansVogelaar's avatar
    Aug 24, 2021

    karlos_gryspeerdt 

    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.