Hi
I have tow sheets MAIN & DATA . the sheets data depends on any new items are existed in sheet main but not existed in sheet DATA then should add the items in sheet DATA after match in COL A between the sheets and insert a new row before row AGGREGATE with the data in COL B,C,D but the values should be in last COL is PU with considerin every time I insert three columns PU,SA,PL . it should copy the value into last COL PU
note: when insert a new row should be with the same formmating and borders also the formula
sheet main
sheet data
expected result with higlighted rows by yellow
I have tow sheets MAIN & DATA . the sheets data depends on any new items are existed in sheet main but not existed in sheet DATA then should add the items in sheet DATA after match in COL A between the sheets and insert a new row before row AGGREGATE with the data in COL B,C,D but the values should be in last COL is PU with considerin every time I insert three columns PU,SA,PL . it should copy the value into last COL PU
note: when insert a new row should be with the same formmating and borders also the formula
sheet main
REPORT1 (1).xlsx | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | DESCRIBE | ||||||
2 | GOODS | TYPE | PR | QTY | |||
3 | CCR | CCR-1 | BMW | 2010 | 123 | ||
4 | CCR-1 | BMW | 2011 | 67 | |||
5 | CCR-2 | TIGUAN | 2012 | 34 | |||
6 | CCR-3 | VOL | 2012 | 30 | |||
7 | CCB | CCB-1 | AUDI | 2011 | 67 | ||
8 | CCB-2 | OPEL | 2008 | 65 | |||
9 | CCB-3 | MER | 2009 | 900 | |||
10 | CCB-3 | MER | 2010 | 800 | |||
11 | CCB-4 | MER | 2013 | 200 | |||
main |
sheet data
REPORT1 (1).xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | DESCRIBE | Q1 | |||||||
2 | GOODS | TYPE | PR | PU | SA | BL | |||
3 | CCR | CCR-1 | BMW | 2010 | 380 | 200 | 180 | ||
4 | CCR-1 | BMW | 2011 | 120 | 40 | 80 | |||
5 | CCR-2 | TIGUAN | 2012 | 120 | - | 120 | |||
6 | AGGREGATE | 620 | 240 | 380 | |||||
7 | CCB | CCB-1 | AUDI | 2011 | 80 | 10 | 70 | ||
8 | CCB-2 | OPEL | 2008 | 100 | 10 | 90 | |||
9 | CCB-3 | MER | 2009 | 120 | 10 | 110 | |||
10 | CCB-3 | MER | 2010 | 101 | 101 | ||||
11 | AGGREGATE | 401 | 30 | 371 | |||||
DATA |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E6:G6 | E6 | =SUM(E3:E5) |
G7:G10,G3:G5 | G3 | =E3-F3 |
E11:G11 | E11 | =SUM(E7:E10) |
expected result with higlighted rows by yellow
REPORT1 (1).xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | DESCRIBE | Q1 | |||||||
2 | GOODS | TYPE | PR | PU | SA | BL | |||
3 | CCR | CCR-1 | BMW | 2010 | 380 | 200 | 180 | ||
4 | CCR-1 | BMW | 2011 | 120 | 40 | 80 | |||
5 | CCR-2 | TIGUAN | 2012 | 120 | - | 120 | |||
6 | CCR-3 | VOL | 2012 | 30 | 30 | ||||
7 | AGGREGATE | 650 | 240 | 410 | |||||
8 | CCB | CCB-1 | AUDI | 2011 | 80 | 10 | 70 | ||
9 | CCB-2 | OPEL | 2008 | 100 | 10 | 90 | |||
10 | CCB-3 | MER | 2009 | 120 | 10 | 110 | |||
11 | CCB-3 | MER | 2010 | 101 | 101 | ||||
12 | CCB-4 | MER | 2013 | 200 | 200 | ||||
13 | AGGREGATE | 401 | 30 | 571 | |||||
DATA |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E7,G7 | E7 | =SUM(E3:E6) |
F7 | F7 | =SUM(F3:F5) |
G8:G12,G3:G6 | G3 | =E3-F3 |
E13:F13 | E13 | =SUM(E8:E11) |
G13 | G13 | =SUM(G8:G12) |