generate missed items and insert before TOTAL row with add the values

MKLAQ

Active Member
Joined
Jan 30, 2021
Messages
397
Office Version
  1. 2016
Platform
  1. Windows
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

REPORT1 (1).xlsx
ABCDE
1DESCRIBE
2GOODSTYPEPRQTY
3CCRCCR-1BMW2010123
4CCR-1BMW201167
5CCR-2TIGUAN201234
6CCR-3VOL201230
7CCBCCB-1AUDI201167
8CCB-2OPEL200865
9CCB-3MER2009900
10CCB-3MER2010800
11CCB-4MER2013200
main



sheet data
REPORT1 (1).xlsx
ABCDEFG
1DESCRIBEQ1
2GOODSTYPEPRPUSABL
3CCRCCR-1BMW2010380200180
4CCR-1BMW20111204080
5CCR-2TIGUAN2012120-120
6AGGREGATE620240380
7CCBCCB-1AUDI2011801070
8CCB-2OPEL20081001090
9CCB-3MER200912010110
10CCB-3MER2010101101
11AGGREGATE40130371
DATA
Cell Formulas
RangeFormula
E6:G6E6=SUM(E3:E5)
G7:G10,G3:G5G3=E3-F3
E11:G11E11=SUM(E7:E10)




expected result with higlighted rows by yellow
REPORT1 (1).xlsx
ABCDEFG
1DESCRIBEQ1
2GOODSTYPEPRPUSABL
3CCRCCR-1BMW2010380200180
4CCR-1BMW20111204080
5CCR-2TIGUAN2012120-120
6CCR-3VOL20123030
7AGGREGATE650240410
8CCBCCB-1AUDI2011801070
9CCB-2OPEL20081001090
10CCB-3MER200912010110
11CCB-3MER2010101101
12CCB-4MER2013200200
13AGGREGATE40130571
DATA
Cell Formulas
RangeFormula
E7,G7E7=SUM(E3:E6)
F7F7=SUM(F3:F5)
G8:G12,G3:G6G3=E3-F3
E13:F13E13=SUM(E8:E11)
G13G13=SUM(G8:G12)
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top