macro count items for duplicate names and merge values

Mussa

Active Member
Joined
Jul 12, 2021
Messages
264
Office Version
  1. 2019
  2. 2010
hi
I want macro count the invoices in COL C for duplicate names in COL B and merge the values in COL E.
the result should show from COL K: M
ARRANGE.xlsm
ABCDEFGHIJKLMN
1DATENAMEINVOICE NOORDER NOTOTALNAMECOUNT INVOICESTOTAL
21/1/2021KALL1INV1000RD10002,000.00KALL135,500.00
31/2/2021KALL2INV1001RD10013,000.00KALL225,500.00
41/3/2021KALL3INV1002RD10024,000.00KALL327,500.00
51/4/2021KALL4INV1003RD10035,000.00KALL427,500.00
61/5/2021KALL5INV1004RD10046,000.00KALL527,500.00
71/6/2021KALL6INV1005RD10052,500.00KALL624,000.00
81/7/2021KALL7INV1006RD10064,500.00KALL726,000.00
91/8/2021KALL8INV1007RD10073,500.00KALL825,000.00
101/9/2021KALL9INV1008RD10081,000.00KALL922,500.00
111/10/2021KALL1INV1009RD10092,000.00
121/11/2021KALL2INV1010RD10102,500.00
131/12/2021KALL3INV1011RD10113,500.00
141/13/2021KALL4INV1012RD10122,500.00
151/14/2021KALL5INV1013RD10131,500.00
161/15/2021KALL6INV1014RD10141,500.00
171/16/2021KALL7INV1015RD10151,500.00
181/17/2021KALL8INV1016RD10161,500.00
191/18/2021KALL9INV1017RD10171,500.00
201/19/2021KALL1INV1018RD10181,500.00
21
SHEET1
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
without a macro:
MrExcelPlayground4.xlsx
ABCDEFGHIJKLM
1DATENAMEINVOICE NOORDER NOTOTALNAMECOUNT INVOICESTOTAL
21/1/2021KALL1INV1000RD10002000KALL13$5,500.00
31/2/2021KALL2INV1001RD10013000KALL22$5,500.00
41/3/2021KALL3INV1002RD10024000KALL32$7,500.00
51/4/2021KALL4INV1003RD10035000KALL42$7,500.00
61/5/2021KALL5INV1004RD10046000KALL52$7,500.00
71/6/2021KALL6INV1005RD10052500KALL62$4,000.00
81/7/2021KALL7INV1006RD10064500KALL72$6,000.00
91/8/2021KALL8INV1007RD10073500KALL82$5,000.00
101/9/2021KALL9INV1008RD10081000KALL92$2,500.00
111/10/2021KALL1INV1009RD10092000  
121/11/2021KALL2INV1010RD10102500  
131/12/2021KALL3INV1011RD10113500  
141/13/2021KALL4INV1012RD10122500  
151/14/2021KALL5INV1013RD10131500  
161/15/2021KALL6INV1014RD10141500  
171/16/2021KALL7INV1015RD10151500  
181/17/2021KALL8INV1016RD10161500  
191/18/2021KALL9INV1017RD10171500  
201/19/2021KALL1INV1018RD10181500
Sheet11
Cell Formulas
RangeFormula
K2:K19K2=IFERROR(INDEX($B$2:$B$20,MATCH(0,COUNTIF($K$1:K1,$B$2:$B$20),0)),"")
L2:L19L2=IF(K2<>"",COUNTIF($B$2:$B$20,K2),"")
M2:M19M2=IF(K2<>"",SUMPRODUCT(--($B$2:$B$20=K2),$E$2:$E$20),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
thanks for the formula is good choice , but in my case is not.
without a macro:
you see my picture is simple data . in reality is about 1000 rows and increases .
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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