zehbart
New member
- Joined
- Mar 15, 2021
- Messages
- 5
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- office365
Hello,
below you can see a part of a bigger table with about 30.000 rows and many different 'ReceiptNo's. The column 'FinalAmount' is usually simplay calculated by dividing 'Amount' by 100.
However, if the 'UnitType' is 5, the FinalAmount for all rows with the same 'ReceiptNo' and and a Time which is before the time of the row with 'UnitType' 5 should be 0.00.
In this example there is UnitType 5 in row 9. So, the FinalAmount in row 1-8 should be 0.00, since the ReceiptNo is the same and the Time is smaller than in row 9.
Does anyone have an idea how to implement this into the calcualtion of 'FinalAmount'?
Thanks already in advance
zehbart
below you can see a part of a bigger table with about 30.000 rows and many different 'ReceiptNo's. The column 'FinalAmount' is usually simplay calculated by dividing 'Amount' by 100.
However, if the 'UnitType' is 5, the FinalAmount for all rows with the same 'ReceiptNo' and and a Time which is before the time of the row with 'UnitType' 5 should be 0.00.
In this example there is UnitType 5 in row 9. So, the FinalAmount in row 1-8 should be 0.00, since the ReceiptNo is the same and the Time is smaller than in row 9.
Does anyone have an idea how to implement this into the calcualtion of 'FinalAmount'?
Thanks already in advance
zehbart
Time | UnitType | ReceiptNo | Product ID | Amount | FinalAmount |
08:28:09 | 0 | 57 | 1245 | 454 | 4.54 |
08:28:09 | 1 | 57 | 340 | 195 | 1.95 |
08:28:09 | 1 | 57 | 311 | 229 | 2.29 |
08:28:09 | 1 | 57 | 325 | 345 | 3.45 |
08:28:09 | 0 | 57 | 315 | 78 | 0.78 |
08:28:09 | 0 | 57 | 395 | 265 | 2.65 |
08:28:09 | 2 | 57 | 0 | 1566 | 15.66 |
08:28:10 | 6 | 57 | 0 | -1 | -0.01 |
08:28:26 | 5 | 57 | 0 | 454 | 4.54 |
08:28:29 | 0 | 57 | 1245 | 454 | 4.54 |
08:28:29 | 1 | 57 | 340 | 195 | 1.95 |
08:28:29 | 1 | 57 | 311 | 229 | 2.29 |
08:28:29 | 1 | 57 | 325 | 345 | 3.45 |
08:28:30 | 0 | 57 | 315 | 78 | 0.78 |
08:28:30 | 0 | 57 | 395 | 265 | 2.65 |
08:28:30 | 2 | 57 | 0 | 1566 | 15.66 |
08:28:30 | 6 | 57 | 0 | -1 | -0.01 |