Code for copying columns of data when it auto updates to create log

lorryroll

New Member
Joined
Sep 25, 2017
Messages
1
Hi all...I've been dipping in and out of this really useful forum to improve my Excel skills immensely...so thanks for the help. I am however struggling to solve what is probably a fairly straight forward bit of coding...something until last week I had no experience with.

I have a regularly updating set of numerical values (every 15 minutes) in a particular column (F1:F50). They each correspond to the water level at 50 different monitoring stations (i.e. each line is a monitoring station). Whenever any of these values change I would like the entire column of previous values to be copied into another column on a separate 'log' sheet - this would then be used as a record and a way of looking for trends. I have managed of sorts to get elements of this task working however getting it all to come together and by column rather than row has proven beyond my abilities. In summary what I would like to achieve is as follows:

1) Values are updated in column F (F1:F50) by way of a data link from a website (this is up and running so all good here).
2) The code sees a change in values, and triggers an action. Note that although all cells will update, the actual values may not change for each station. Hence the trigger will need to be if any values in the whole column change. As 80% of the values will always change perhaps the most straightforward way to do this would be that if a total of the column changes, say cell F51. (i.e. if F51 changes, F1:F50 previous values are copied).
3) Column F (F1:F50) previous values are copied into column D on the log sheet (or new values if this is not possible)
4) Values update automatically again in column F
5) Column F (F1:F50) previous values are copied into next column (column E) on the log sheet
6) Values update automatically again in column F
7) Column F (F1:F50) previous values are copied into next column (column F) on the log sheet.....etc....etc...
8) To put the icing on the cake it would be great if this could happen a maximum of 96 times (1 day of data), i.e. 96 columns, before the spreadsheet started over-writing the first column in the log sheet.

Hope someone here can put me on the right track!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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