How to Log Audit trail of a particular cell of a Worksheet

VenkateshV

New Member
Joined
Dec 7, 2017
Messages
1
Hi Folks,

I'm relatively beginner and new to this forum. and appreciate if could help me to get the coding idea How to Log Audit trail of a particular cell or cells of a Worksheet
Say I have a workbook where i have worksheet "Sheet1" where the records are displayed as indicated below.

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Val1[/TD]
[TD]val2[/TD]
[TD]val3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]2 Apple[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]5[/TD]
[TD]Orange[/TD]
[TD]5 Orange[/TD]
[/TR]
</tbody>[/TABLE]





Where fields Va1, and val3 is text and val3 is a formula based cell displays the final result. (i.e. concatenates val1 & Val2 and displays as a final string value)

Audit Log Population part

Now i start editing the val1 & val2 fields in a later date and wanted to know the full audit log trail of cells val1 to val3, with details like

1) what is old value , 2) what is new value and 3) Time of change Date & Time informations

and get the audit log populated in another sheet "Logs" within this same workbook.

On the "Logs" Worksheet which basically resembles same as "Sheet1", i want all the audit trail logs of the individual cell changes get populated on the same cells appended one after the other and should look like below.

say after i have performed 2 changes on my val1 & val2

[TABLE="class: grid, width: 750"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Val1[/TD]
[TD]Va2[/TD]
[TD]val3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]old, new, Time
2, 3, 08-Dec-17 09:09:02
3, 5, 09-Dec-17 10:13:11[/TD]
[TD]old, new, Time
Apple, grape, 08-Dec-17 09:10:02
grape, cherry, 09-Dec-17 10:13:15[/TD]
[TD]old, new, Time
2 Apple, 3 grape, 08-Dec-17 09:10:02
3 grape, 5 cherry, 09-Dec-17 10:13:15[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]old, new, Time
5, 4, 08-Dec-17 09:09:01
4, 2, 09-Dec-17 10:13:13[/TD]
[TD]old, new, Time
Orange, Fir, 08-Dec-17 09:10:02
Fir, grape, 09-Dec-17 10:13:18[/TD]
[TD]old, new, Time
5 Orange, 4 Fir, 08-Dec-17 09:10:02
4 Fir, 2 Grape, 09-Dec-17 10:13:18[/TD]
[/TR]
</tbody>[/TABLE]

Kindly help me a simple and efficient VBA coding by which i can achieve above.

Many thanks in advance for your support.

Regards
Venkat
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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
Back
Top