In a question to my blog article “How to keep track of changes in a MS Excel spreadsheet” I have been asked whether the code I showed there could be changed to monitor multiple columns in a spreadsheet.
Of course it can. The new code I am showing below handles an arbitrary number of columns, with the following assumptions / pre-requisites:
- Column label in row 1
- Row identifier (id) in column 1 of each row
I have changed my example from the previous article and added an additional column to my list of products: ‘Vendor’, here is an example:
Let’s change Price of Product C to $ 1301,00 and Vendor to ‘Company B’. Here is how the new Change History looks like:
Column B now shows which columns was changed and column C the new value, as usually together with a time stamp. Column A identifies for what product ( my ‘id’ column in this example ) the change occurred.
And here is the new code: