I want to lookup the purchase records for a list of items having one quantity each from a data having following fields column a,b,c,d,e as follows item code, quantity, date, invoice number, discount in such a way that it uses the lifo principle but based on the quantity of purchase records for eg item a is purchase twice one with 2 qty and another with 1 qty on different date under different invoice number now the list of items contains item a at three different instances with one quantity each I want to lookup the purchase records for all three quantities based on lifo details
architecture titles.xlsx | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | ItemCode | Qty | Date | Inv No | Disc | List of ItemCode | NEED DATA IN THIS MANNER | ||||||||
2 | 9790750656305 | 2 | 22-04-2023 | 123 | 20 | 9790750656305 | List of ItemCode | Qty | Date | Inv No | Disc | ||||
3 | 9790750656305 | 1 | 10-12-2022 | 345 | 30 | 9790750656305 | 9790750656305 | 1 | 22-04-2023 | 123 | 20 | ||||
4 | 9788417769697 | 2 | 03-05-2023 | 234 | 40 | 9790750656305 | 9790750656305 | 1 | 22-04-2023 | 123 | 20 | ||||
5 | 9781138694293 | 1 | 04-03-2023 | 675 | 50 | 9788417769697 | 9790750656305 | 1 | 10-12-2022 | 345 | 30 | ||||
6 | 9781138860971 | 1 | 05-05-2023 | 456 | 25 | 9788417769697 | 9788417769697 | 1 | 03-05-2023 | 234 | 40 | ||||
7 | 9781138676435 | 1 | 12-12-2022 | 789 | 70 | 9781138694293 | 9788417769697 | 1 | 03-05-2023 | 234 | 40 | ||||
8 | 9781138676435 | 2 | 10-12-2022 | 354 | 50 | 9781138860971 | 9781138694293 | 1 | 04-03-2023 | 675 | 50 | ||||
9 | 9781472471697 | 3 | 01-01-2023 | 265 | 30 | 9781138676435 | 9781138860971 | 1 | 05-05-2023 | 456 | 25 | ||||
10 | 9780367330255 | 1 | 03-02-2023 | 785 | 35 | 9781138676435 | 9781138676435 | 1 | 12-12-2022 | 789 | 70 | ||||
11 | 9781472471147 | 1 | 03-03-2023 | 468 | 40 | 9781472471697 | 9781138676435 | 1 | 10-12-2022 | 354 | 50 | ||||
12 | 9781138917125 | 3 | 02-06-2023 | 965 | 55 | 9780367330255 | 9781472471697 | 1 | 01-01-2023 | 265 | 30 | ||||
13 | 9781138917125 | 2 | 01-06-2023 | 127 | 52.5 | 9781472471147 | 9780367330255 | 1 | 03-02-2023 | 785 | 35 | ||||
14 | 9781138917125 | 1 | 31-05-2023 | 771 | 57.5 | 9781138917125 | 9781472471147 | 1 | 03-03-2023 | 468 | 40 | ||||
15 | 9780128202548 | 1 | 02-01-2023 | 175 | 40 | 9781138917125 | 9781138917125 | 1 | 02-06-2023 | 965 | 55 | ||||
16 | 9780323994613 | 1 | 02-02-2023 | 289 | 32 | 9781138917125 | 9781138917125 | 1 | 02-06-2023 | 965 | 55 | ||||
17 | 9780128114551 | 1 | 03-02-2023 | 345 | 33.33 | 9781138917125 | 9781138917125 | 1 | 02-06-2023 | 965 | 55 | ||||
18 | 9781138917125 | 9781138917125 | 1 | 01-06-2023 | 127 | 52.5 | |||||||||
19 | 9781138917125 | 9781138917125 | 1 | 01-06-2023 | 127 | 52.5 | |||||||||
20 | 9781138917125 | 9781138917125 | 1 | 31-05-2023 | 771 | 57.5 | |||||||||
21 | 9781138917125 | 9781138917125 | #N/A | #N/A | #N/A | #N/A | |||||||||
22 | 9780128202548 | 9781138917125 | #N/A | #N/A | #N/A | #N/A | |||||||||
23 | 9780323994613 | 9780128202548 | 1 | 02-01-2023 | 175 | 40 | |||||||||
24 | 9780128114551 | 9780323994613 | 1 | 02-02-2023 | 289 | 32 | |||||||||
25 | 9780128114551 | 1 | 03-02-2023 | 345 | 33.33 | ||||||||||
26 | |||||||||||||||
Sheet2 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
A1:A17 | Cell Value | duplicates | text | NO |