Hi,
I need help with a loop or a steer if there is a better way. I have a table i have where i have imported each column into a array so the first one is DateTime(i, 1) etc.
I need to correct the value 2 where they do not sum up to value 1 by adding or removing the difference from the largest value 2. So the first 4 rows would be unchanged, in the second 4 rows the 1.7981 would be amended to 1.7982 to match the 2.52.
I was going to do a loop to loop through the unique date/time then loop through unique IDs, then loop through unique name, then loop through unique Value1 and where a row matched sum up value2 and amend as need be.
However that will take a long time, does anyone have a steer what other technique i could use to find a match and amend in a large amount of data?
REgards
Taz
I need help with a loop or a steer if there is a better way. I have a table i have where i have imported each column into a array so the first one is DateTime(i, 1) etc.
I need to correct the value 2 where they do not sum up to value 1 by adding or removing the difference from the largest value 2. So the first 4 rows would be unchanged, in the second 4 rows the 1.7981 would be amended to 1.7982 to match the 2.52.
I was going to do a loop to loop through the unique date/time then loop through unique IDs, then loop through unique name, then loop through unique Value1 and where a row matched sum up value2 and amend as need be.
However that will take a long time, does anyone have a steer what other technique i could use to find a match and amend in a large amount of data?
REgards
Taz
Date/Time | ID | Name | Value1 | Value 2 |
12/06/2021 16:30 | 1 | NF | 9.85 | 1 |
12/06/2021 16:30 | 1 | NF | 9.85 | 1.8686 |
12/06/2021 16:30 | 1 | NF | 9.85 | 3.505 |
12/06/2021 16:30 | 1 | NF | 9.85 | 3.4764 |
12/06/2021 17:30 | 9 | NF | 2.52 | 0 |
12/06/2021 17:30 | 9 | NF | 2.52 | 0.7218 |
12/06/2021 17:30 | 9 | NF | 2.52 | 0 |
12/06/2021 17:30 | 9 | NF | 2.52 | 1.7981 |
12/06/2021 18:00 | 1 | GF | 9.85 | 0 |
12/06/2021 18:00 | 1 | GF | 9.85 | 4.005 |
12/06/2021 18:00 | 1 | GF | 9.85 | 0 |
12/06/2021 18:00 | 1 | GF | 9.85 | 5.845 |
12/06/2021 18:30 | 9 | GF | 14 | 0 |
12/06/2021 18:30 | 9 | GF | 14 | 4.1535 |
12/06/2021 18:30 | 9 | GF | 14 | 0 |
12/06/2021 18:30 | 9 | GF | 14 | 9.846 |