I have a big spreadsheet of over 3000 records grouped by Bin then by Item ID that I import from a text document.
Each Item ID group will not have the same number of records and might have 100 records more or less. In all the rows that show "Item Total", in column F, I have to calculate the difference between the last record and the first record of each Item ID group (cells that I highlighted in green).
The result that I should get in cell F8 should be 84 (207-123=84), and 45 in cell F16, and 39 in F21.
Will you please help me with this? Any help would be greatly appreciated?
Each Item ID group will not have the same number of records and might have 100 records more or less. In all the rows that show "Item Total", in column F, I have to calculate the difference between the last record and the first record of each Item ID group (cells that I highlighted in green).
The result that I should get in cell F8 should be 84 (207-123=84), and 45 in cell F16, and 39 in F21.
Will you please help me with this? Any help would be greatly appreciated?
Anh Tu1.xls | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Bin | ItemID | DateIn | Qty | Value | |||
2 | ||||||||
3 | 001 | |||||||
4 | 001.1 | 4-Aug | 8 | 8.4 | 123 | |||
5 | 6-Aug | 8 | 7.8 | 156 | ||||
6 | 8-Aug | 8 | 8.3 | 189 | ||||
7 | 10-Aug | 6 | 7.8 | 207 | ||||
8 | ItemTotal | 30 | 32.3 | F7-F4=84 | ||||
9 | ||||||||
10 | BinTotal | 30 | 32.3 | |||||
11 | ||||||||
12 | ||||||||
13 | 002 | |||||||
14 | 002.1 | 6-Aug | 13 | 13.3 | 205 | |||
15 | 7-Aug | 9 | 11.2 | 250 | ||||
16 | ItemTotal | 22 | 24.5 | F15-F14=45 | ||||
17 | ||||||||
18 | 002.2 | 9-Aug | 5 | 5.8 | 111 | |||
19 | 10-Aug | 7 | 9.2 | 124 | ||||
20 | 11-Aug | 8 | 8.3 | 150 | ||||
21 | ItemTotal | 20 | 23.3 | F20-F18=39 | ||||
22 | ||||||||
23 | BinTotal | 44 | 47.8 | |||||
24 | ||||||||
25 | GRANDTOTAL | 74 | 80.1 | |||||
Anh Tu |