......and i get a debug error at the following point:
.Cells(4, ColNo).Select
My oversight, the code was designed to allow updating up to 1 hour after the required time, if say you need the values for 10:00, then you can get these figures any time between 10:00 and 10:59:59. when the time goes to 11:00 or over, you can't get another update until 12:00. This is where the error lies.
Change the code to this
is now inside the if statement.
The line is probably redundant as it is followed by another selected cell in the sheet change event.
You can add to the sampling times if you need to but the code is only valid for whole hours e.g. 09:00, 10:00, etc.
The "Time Stamp" is not automatic, it is updated by any change on the sheet, or by Formulas > Calculate Now. Do you need it to be automatic while the sheet is active?
Does this clarify things for you?
Bookmarks