Changes only

thorpyuk

Well-known Member
Joined
Mar 14, 2006
Messages
1,453
Hiya,

I have a spreadsheet that you can enter customer details onto. I can 'import' these details by using a search, and then change them at will.

The one problem is that I wish to export changes into a sheet called 'export'

Therein lies the problem..... I can easily enough just copy everything into the export spreadsheet, but then I can forsee the conversation approaching: "cant you just give us what has changed?"

Now, i've seen a few macros that can either add comments to a cell, or add text to an adjecant cell if anything changes, but these are no good for me for 2 reasons:

1) I use a macro to import into the sheet in the first place, and this constitues several change events in the worksheet_change module.
2) I would then need to easily export the changes, and I dont see me being able to do this easily given the method above.

Please can anyone point me in the right direction? I'm not necessarily looking for code, but any ideas you may have would be great! Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

thorpyuk

Well-known Member
Joined
Mar 14, 2006
Messages
1,453
Here's the form that the data is imported into. I want to bring the changes into a basic export sheet (where the data will be a lot more linear)

sample.jpg
 

thorpyuk

Well-known Member
Joined
Mar 14, 2006
Messages
1,453

ADVERTISEMENT

*bumpety bump*
 

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995

ADVERTISEMENT

Hi

Can you tell us about changes? about what againt what?
 

thorpyuk

Well-known Member
Joined
Mar 14, 2006
Messages
1,453
The user can change any of the fields in the picture above.... is that what you mean?
 

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995
Not sure if this is what you wanted
to a sheet module
Code:
Private OldData(1)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
OldData(0) = OldData(1)
OldData(1) = Target.Value
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then
     With Application
          .EnableEvents = False
          .Undo
          .EnableEvents = True
     End With
     Exit Sub
End If
If Target.Value <> OldData(0) Then
     Application.EnableEvents = False
     Target.Offset(,1).Value = "Was : " & OldData(0) & ", Now : " & Target.Value
     Application.EnableEvents = True
End If
End Sub
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,565
Messages
5,765,147
Members
425,263
Latest member
alcat

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
Top