Scroll_Slowly
New Member
- Joined
- Aug 1, 2024
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hello. Firstly, I would like to express many thanks to those forum members which posts have already helped me achieve many improvements to data processing.
While I am aware there may be different approach, let me explain my procedure here.
Data is recorded with a timestamp value, which is supposed to be every minute. However, some of the files have additional data points, i.e. more than 1 per minute or there is a 1 min value missing (data is recorded to the next minute interval).
Currently, I have some VBA code to compare the minute values and then the seconds with a bunch of IF statements - but I believe this approach is not ideal.
Example in the data set below is row 1 and row 2 data arrive in the same minute interval but row 3 has value for 2 minutes after the first entry, so there is a data point 'missing'.
With my limited understanding of VBA, I have reached a large brick wall.
I would like to correctly identify whether the minute interval exists or if it should be created (by revising an existing time stamp).
I am having trouble conceptualizing the steps to properly discern when the timestamp needs to be changed or if value is in fact a duplicate.
I would appreciate if anyone can provide even the slightest push in the right direction.
Thank you in advance.
Example data set:
Example result to produce:
While I am aware there may be different approach, let me explain my procedure here.
Data is recorded with a timestamp value, which is supposed to be every minute. However, some of the files have additional data points, i.e. more than 1 per minute or there is a 1 min value missing (data is recorded to the next minute interval).
Currently, I have some VBA code to compare the minute values and then the seconds with a bunch of IF statements - but I believe this approach is not ideal.
Example in the data set below is row 1 and row 2 data arrive in the same minute interval but row 3 has value for 2 minutes after the first entry, so there is a data point 'missing'.
With my limited understanding of VBA, I have reached a large brick wall.
I would like to correctly identify whether the minute interval exists or if it should be created (by revising an existing time stamp).
I am having trouble conceptualizing the steps to properly discern when the timestamp needs to be changed or if value is in fact a duplicate.
I would appreciate if anyone can provide even the slightest push in the right direction.
Thank you in advance.
Example data set:
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | 07/31/2024 19:48:00 EDT | Zone 2 - AST 1 FLOW RATE | 142.897 | alarm | ||
2 | 07/31/2024 19:48:58 EDT | Zone 2 - AST 1 FLOW RATE | 143.022 | alarm | ||
3 | 07/31/2024 19:50:00 EDT | Zone 2 - AST 1 FLOW RATE | 143.084 | alarm | ||
4 | 07/31/2024 19:50:05 EDT | Zone 2 - AST 1 FLOW RATE | 143.084 | alarm | ||
5 | 07/31/2024 19:51:00 EDT | Zone 2 - AST 1 FLOW RATE | 144.084 | alarm | ||
6 | 07/31/2024 19:52:00 EDT | Zone 2 - AST 1 FLOW RATE | 145.084 | alarm | ||
7 | 07/31/2024 19:53:00 EDT | Zone 2 - AST 1 FLOW RATE | 146.084 | alarm | ||
Sheet1 |
Example result to produce:
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | 07/31/2024 19:48:00 EDT | Zone 2 - AST 1 FLOW RATE | 142.897 | alarm | ||
2 | 07/31/2024 19:49:00 EDT | Zone 2 - AST 1 FLOW RATE | 143.022 | alarm | ||
3 | 07/31/2024 19:50:00 EDT | Zone 2 - AST 1 FLOW RATE | 143.084 | alarm | ||
4 | 07/31/2024 19:51:00 EDT | Zone 2 - AST 1 FLOW RATE | 144.084 | alarm | ||
5 | 07/31/2024 19:52:00 EDT | Zone 2 - AST 1 FLOW RATE | 145.084 | alarm | ||
6 | 07/31/2024 19:53:00 EDT | Zone 2 - AST 1 FLOW RATE | 146.084 | alarm | ||
Sheet2 |