merge duplicates items without delete duplicates rows

Hasson

Active Member
Joined
Apr 8, 2021
Messages
406
Office Version
  1. 2016
Platform
  1. Windows
Hi guys ,
I need merging duplicates items for column F based on column B and the result should be in column G
before
atr.xlsm
ABCDEF
1DATEINVO NOIDQTYUNIT PRICETOTAL
201/05/2023AS-001IDTR-100100.000100.00010,000.000
302/05/2023AS-001IDTR-101100.000100.00010,000.000
403/05/2023AS-002IDTR-10220.000120.0002,400.000
504/05/2023AS-003IDTR-10330.000140.0004,200.000
605/05/2023AS-003IDTR-10440.000160.0006,400.000
706/05/2023AS-003IDTR-10550.000180.0009,000.000
807/05/2023AS-003IDTR-10660.000200.00012,000.000
908/05/2023AS-006IDTR-10770.000220.00015,400.000
1009/05/2023AS-007IDTR-10880.000240.00019,200.000
1110/05/2023AS-008IDTR-10990.000260.00023,400.000
1211/05/2023AS-009IDTR-110100.000280.00028,000.000
1312/05/2023AS-009IDTR-111110.000300.00033,000.000
1413/05/2023AS-009IDTR-112120.000320.00038,400.000
1514/05/2023AS-010IDTR-113130.000340.00044,200.000
INFO
Cell Formulas
RangeFormula
F2:F15F2=D2*E2

result

atr.xlsm
ABCDEFG
1DATEINVO NOIDQTYUNIT PRICETOTAL
201/05/2023AS-001IDTR-100100.000100.00010,000.000
302/05/2023AS-001IDTR-101100.000100.00010,000.00020,000.000
403/05/2023AS-002IDTR-10220.000120.0002,400.0002,400.000
504/05/2023AS-003IDTR-10330.000140.0004,200.000
605/05/2023AS-003IDTR-10440.000160.0006,400.000
706/05/2023AS-003IDTR-10550.000180.0009,000.000
807/05/2023AS-003IDTR-10660.000200.00012,000.00031,600.000
908/05/2023AS-006IDTR-10770.000220.00015,400.00015,400.000
1009/05/2023AS-007IDTR-10880.000240.00019,200.00019,200.000
1110/05/2023AS-008IDTR-10990.000260.00023,400.00023,400.000
1211/05/2023AS-009IDTR-110100.000280.00028,000.000
1312/05/2023AS-009IDTR-111110.000300.00033,000.000
1413/05/2023AS-009IDTR-112120.000320.00038,400.00099,400.000
1514/05/2023AS-010IDTR-113130.000340.00044,200.00044,200.000
INFO
Cell Formulas
RangeFormula
G3G3=SUM(F2:F3)
G4,G15,G9:G11G4=F4
G8G8=SUM(F5:F8)
F2:F15F2=D2*E2
G14G14=SUM(F12:F14)

the data could be 7000 rows.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try this in G2 and fill down:

Code:
=IF(B2=B3,"",SUMIF($B$2:$B$15,B2,$F$2:$F$15))
 
Upvote 0
thanks
but I have big data , do I pull the formula every time when add new data?
 
Upvote 0
Change the reference to row 15 to something large but reasonable. How about 10000? Will that work with future data?

Code:
=IF(B2=B3,"",SUMIF($B$2:$B$10000,B2,$F$2:$F$10000))
 
Upvote 0
Would a presentation like the following work for you?

DATEINVO NOIDQTYUNIT PRICETOTALTotals
5/1/2023AS-001IDTR-1001001001000020000
5/2/2023AS-001IDTR-1011001001000020000
5/3/2023AS-002IDTR-1022012024002400
5/4/2023AS-003IDTR-10330140420031600
5/5/2023AS-003IDTR-10440160640031600
5/6/2023AS-003IDTR-10550180900031600
5/7/2023AS-003IDTR-106602001200031600
5/8/2023AS-006IDTR-107702201540015400
5/9/2023AS-007IDTR-108802401920019200
5/10/2023AS-008IDTR-109902602340023400
5/11/2023AS-009IDTR-1101002802800099400
5/12/2023AS-009IDTR-1111103003300099400
5/13/2023AS-009IDTR-1121203203840099400
5/14/2023AS-010IDTR-1131303404420044200
 
Upvote 0
How about 10000? Will that work with future data?
I'm not sure what you mean . do you mean th formula could not deal with big ?
if it's so , then I think needing vba .
 
Upvote 0
The PQ solution will work with a million rows. If you add data to the original information, PQ will automatically update as the original data will be in a table.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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