Merge QTY & AMOUNT for each part of item for each range

Amer Omar

New Member
Joined
Jan 27, 2024
Messages
20
Office Version
  1. 2019
Platform
  1. Windows
Hello
I have theses data in sheets .
AMR.xlsm
ABCDEFG
1DATEBATCHINVOICE NOCLIENT NOQTYPRICETOTAL
211/01/2024AVDF FG-900 L200INFLOW CVBF AAA100BVCDG5000200.00220.0044,000.00
312/01/2024AVDF FG-900 L201INFLOW CVBF AAA101BVCDG5001100.00220.0022,000.00
413/01/2024AVDF FG-900 L202OUTFLOW CVBF BBB100BVCDG500250.00120.006,000.00
514/01/2024AVDF FG-900 L203INFLOW CVBF AAA102BVCDG500360.00110.006,600.00
615/01/2024AVDF FG-900 L204OUTFLOW CVBF BBB101BVCDG500470.00115.008,050.00
716/01/2024AVDF FG-900 L205INFLOW CVBF AAA103BVCDG500580.00120.009,600.00
817/01/2024AVDF FG-900 L206GO BACK INFLOW GGG5000BVCDG500690.00125.0011,250.00
918/01/2024AVDF FG-900 L200GO BACK INFLOW GGG5001BVCDG5007100.00130.0013,000.00
1019/01/2024AVDF FG-900 L201GO BACK INFLOW GGG5002BVCDG5008110.00135.0014,850.00
1120/01/2024AVDF FG-900 L202GO BACK OUTFLOW FFF6000BVCDG5009120.00140.0016,800.00
1221/01/2024AVDF FG-900 L207GO BACK OUTFLOW FFF6001BVCDG5010130.00145.0018,850.00
1322/01/2024AVDF FG-900 L207UNDER INFLOW CVFG9000BVCDG501020.00145.002,900.00
1423/01/2024AVDF FG-900 L204UNDER OUTFLOW CVBF UNN7800BVCDG500410.00115.001,150.00
1524/01/2024AVDF FG-900 L200UNDER INFLOW CVFG9001BVCDG5000100.00220.0022,000.00
1625/01/2024AVDF FG-900 L202UNDER OUTFLOW CVBF UNN7801BVCDG500210.00120.001,200.00
CVD
Cell Formulas
RangeFormula
G2:G16G2=E2*F2




AMR.xlsm
ABCDEFG
1DATEBATCHINVOICE NOCLIENT NOQTYPRICETOTAL
211/01/2024AVDF FG-900 L200OUTFLOW CVBF BBB101BVCDG500010.00244.002,440.00
312/01/2024AVDF FG-900 L201OUTFLOW CVBF BBB102BVCDG500010.00126.001,260.00
413/01/2024AVDF FG-900 L202OUTFLOW CVBF BBB103BVCDG50005.00150.00750.00
514/01/2024AVDF FG-900 L203INFLOW CVBF AAA104BVCDG500120.00140.002,800.00
615/01/2024AVDF FG-900 L200INFLOW CVBF AAA105BVCDG500210.00155.001,550.00
716/01/2024AVDF FG-900 L201INFLOW CVBF AAA103BVCDG500380.00144.0011,520.00
817/01/2024AVDF FG-900 L202GO BACK INFLOW GGG5003BVCDG500490.00130.0011,700.00
918/01/2024AVDF FG-900 L203GO BACK OUTFLOW FFF6002BVCDG5005100.00150.0015,000.00
1019/01/2024AVDF FG-900 L204GO BACK INFLOW GGG5004BVCDG5006110.00140.0015,400.00
1120/01/2024AVDF FG-900 L205GO BACK OUTFLOW FFF6003BVCDG5007120.00200.0024,000.00
1221/01/2024AVDF FG-900 L206GO BACK OUTFLOW FFF6004BVCDG500810.00155.001,550.00
1322/01/2024AVDF FG-900 L202UNDER OUTFLOW CVBF UNN7802BVCDG500950.00220.0011,000.00
1423/01/2024AVDF FG-900 L203UNDER INFLOW CVFG9003BVCDG501060.00230.0013,800.00
1524/01/2024AVDF FG-900 L204UNDER OUTFLOW CVBF UNN7803BVCDG501170.00260.0018,200.00
1625/01/2024AVDF FG-900 L205UNDER INFLOW CVFG9004BVCDG5012100.00225.0022,500.00
1726/01/2024AVDF FG-900 L206UNDER INFLOW CVFG9005BVCDG5013300.00250.0075,000.00
CVRM
Cell Formulas
RangeFormula
G2:G17G2=E2*F2



AMR.xlsm
ABCDEFGHI
1FROM DATETO DATE
2
3
4CVD
5ITEMINVOICE NOQTYTOTAL
61INFLOW
72GO BACK INFLOW
83UNDER INFLOW
9BALANCE0.00
10
11
12CVRM
13ITEMINVOICE NOQTYTOTAL
141OUTFLOW
152GO BACK OUTFLOW
163UNDER OUTFLOW
17BALANCE0.00
OUTPUT
Cell Formulas
RangeFormula
D9,D17D9=D6-D7-D8



result
if G2,I2 are empty then match part of item in column B for OUTPUT sheet with item in column C for others sheets then should merge QTY,AMOUNT E,G
AMR.xlsm
ABCDEFGHI
1FROM DATETO DATE
2
3
4CVD
5ITEMINVOICE NOQTYTOTAL
61INFLOW550.0098,070.00
72GO BACK INFLOW500.0066,200.00
83UNDER INFLOW580.00136,200.00
9BALANCE-104,330.00
10
11
12CVRM
13ITEMINVOICE NOQTYTOTAL
141OUTFLOW145.0018,500.00
152GO BACK OUTFLOW480.0076,200.00
163UNDER OUTFLOW140.0031,550.00
17BALANCE-89,250.00
OUTPUT
Cell Formulas
RangeFormula
D9,D17D9=D6-D7-D8

if there are two dates in G2,I2(DD/MM/YYYY) then should merge within dates .
data could reach for 10000 rows for each sheet.
doing that by formula or vba is acceptable , otherwise I don't prefer like PQ or PT.
thanks
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
doing that by formula
How about:

Dante Amor
ABCDEFGHIJ
1FROM DATETO DATE
2
3
4CVD
5ITEMINVOICE NOQTYTOTAL
61INFLOW550.0098,070.00
72GO BACK INFLOW500.0066,200.00
83UNDER INFLOW580.00136,200.00
9BALANCE-104,330.00
10
11
12CVRM
13ITEMINVOICE NOQTYTOTAL
141OUTFLOW145.0018,500.00
152GO BACK OUTFLOW480.0076,200.00
163UNDER OUTFLOW140.0031,550.00
17BALANCE-89,250.00
18
19
OUTPUT
Cell Formulas
RangeFormula
C14:C16,C6:C8C6=SUMIFS(CVD!E:E,CVD!C:C,B6&"*",CVD!A:A,">="&MAX(G$2,1),CVD!A:A,"<="&MIN(I$2,9^9)) +SUMIFS(CVRM!E:E,CVRM!C:C,B6&"*",CVRM!A:A,">="&MAX(G$2,1),CVRM!A:A,"<="&MIN(I$2,9^9))
D14:D16,D6:D8D6=SUMIFS(CVD!G:G,CVD!C:C,B6&"*",CVD!A:A,">="&MAX(G$2,1),CVD!A:A,"<="&MIN(I$2,9^9)) +SUMIFS(CVRM!G:G,CVRM!C:C,B6&"*",CVRM!A:A,">="&MAX(G$2,1),CVRM!A:A,"<="&MIN(I$2,9^9))
D9,D17D9=D6-D7-D8
 
Upvote 0
Solution

Forum statistics

Threads
1,223,104
Messages
6,170,125
Members
452,303
Latest member
c4cstore

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