list the changed cell data.

%3CLINGO-SUB%20id%3D%22lingo-sub-2829971%22%20slang%3D%22en-US%22%3Elist%20the%20changed%20cell%20data.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2829971%22%20slang%3D%22en-US%22%3EHi%2C%20I%20want%20him%20to%20save%20it%20when%20the%20cell%20contents%20change.%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20an%20example%3CBR%20%2F%3ESuppose%20cell%20B12%20has%20changed%20its%20contents%205%20times%20in%201%20hour.%20These%20variables(1%2C2%2C3%2C4%2C5)%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20I%20want%20is%20cell%20A1%20on%20Page2%3B%3CBR%20%2F%3E1%3CBR%20%2F%3E2%3CBR%20%2F%3E3%3CBR%20%2F%3E4%3CBR%20%2F%3E5%3CBR%20%2F%3Eand%20then%20I%20want%20to%20print%20the%20registration%20date%20in%20Cell%20A2%3CBR%20%2F%3EI'm%20waiting%20for%20your%20help.%20thanks%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2829971%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2830036%22%20slang%3D%22en-US%22%3ERe%3A%20list%20the%20changed%20cell%20data.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2830036%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1180655%22%20target%3D%22_blank%22%3E%40osdogru%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'd%20do%20it%20like%20this%3A%3C%2FP%3E%0A%3CP%3ERight-click%20the%20sheet%20tab.%3C%2FP%3E%0A%3CP%3ESelect%20'View%20Code'%20from%20the%20context%20menu.%3C%2FP%3E%0A%3CP%3ECopy%20the%20following%20code%20into%20the%20code%20window%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-visual-basic%22%3E%3CCODE%3EPrivate%20Sub%20Worksheet_Change(ByVal%20Target%20As%20Range)%0A%20%20%20%20Dim%20rng%20As%20Range%0A%20%20%20%20If%20Not%20Intersect(Range(%22B12%22)%2C%20Target)%20Is%20Nothing%20Then%0A%20%20%20%20%20%20%20%20With%20Worksheets(%22Sheet2%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20Set%20rng%20%3D%20.Range(%22B%22%20%26amp%3B%20.Rows.Count).End(xlUp).Offset(1)%0A%20%20%20%20%20%20%20%20End%20With%0A%20%20%20%20%20%20%20%20rng.Offset(0%2C%20-1).Value%20%3D%20Range(%22B12%22).Value%0A%20%20%20%20%20%20%20%20rng.Value%20%3D%20Now%0A%20%20%20%20End%20If%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ESwitch%20back%20to%20Excel.%3C%2FP%3E%0A%3CP%3ESave%20the%20workbook%20as%20a%20macro-enabled%20workbook.%3C%2FP%3E%0A%3CP%3EMake%20sure%20that%20you%20allow%20macros%20when%20you%20open%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor
Hi, I want him to save it when the cell contents change.

As an example
Suppose cell B12 has changed its contents 5 times in 1 hour. These variables(1,2,3,4,5)

What I want is cell A1 on Page2;
1
2
3
4
5
and then I want to print the registration date in Cell A2
I'm waiting for your help. thanks
1 Reply

@osdogru 

I'd do it like this:

Right-click the sheet tab.

Select 'View Code' from the context menu.

Copy the following code into the code window:

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rng As Range
    If Not Intersect(Range("B12"), Target) Is Nothing Then
        With Worksheets("Sheet2")
            Set rng = .Range("B" & .Rows.Count).End(xlUp).Offset(1)
        End With
        rng.Offset(0, -1).Value = Range("B12").Value
        rng.Value = Now
    End If
End Sub

Switch back to Excel.

Save the workbook as a macro-enabled workbook.

Make sure that you allow macros when you open it.