Excel Questions

jibu08

New Member
Joined
Jun 27, 2018
Messages
13
hello everyone, URGENT HELP
need your help in finding a formula..
i have a very large database where i have more than 1000 product and 500 customer .. i need to know what products are listed/sold by each customer .. i have used count-if and count-ifs but it is giving me repeated product ... for eg: luna has 20 product so i need to know 111 customer is selling how many luna product?
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer code[/TD]
[TD]Product code[/TD]
[TD]Brand[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]111[/TD]
[TD][TABLE="width: 92"]
<tbody>[TR]
[TD="class: xl65, width: 92"]10010040[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]Luna[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 345"]
<tbody>[TR]
[TD="class: xl65, width: 345"]Luna Green Peas[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]111[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 92"]
<tbody>[TR]
[TD="class: xl65, width: 92"]10010050[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]Luna[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 345"]
<tbody>[TR]
[TD="class: xl65, width: 345"]Luna Chick Peas[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]112[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 92"]
<tbody>[TR]
[TD="class: xl65, width: 92"]10011049[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]ABC[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 345"]
<tbody>[TR]
[TD="class: xl65, width: 345"]Dairyland Danish Cheddar Block Coloured[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]112[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 92"]
<tbody>[TR]
[TD="class: xl65, width: 92"]10011051[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]ABC[/TD]
[TD][TABLE="width: 345"]
<tbody>[TR]
[TD="class: xl65, width: 345"]Dairyland Danish Cheddar Block White[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]112[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 92"]
<tbody>[TR]
[TD="class: xl65, width: 92"]10036240[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]XXX[/TD]
[TD][TABLE="width: 345"]
<tbody>[TR]
[TD="class: xl65, width: 345"]Sunbulah Lamb Kebabs[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 86"]
<tbody>[TR]
[TD="class: xl65, width: 86"]112[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 92"]
<tbody>[TR]
[TD="class: xl65, width: 92"]10010050[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Luna[/TD]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 345"]
<tbody>[TR]
[TD="class: xl65, width: 345"]Luna Chick Peas 400 Gm[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Book1
ABCDFGHIJ
1Customer codeProduct codeBrandProduct
211110010040LunaLuna Green PeasCusLunaABCXXX
311110010050LunaLuna Chick Peas111200
411210011049ABCDairyland Danish Cheddar Block Coloured112121
511210011051ABCDairyland Danish Cheddar Block White
611210011051ABCDairyland Danish Cheddar Block White
711210036240XXXSunbulah Lamb Kebabs
811110010040LunaLuna Green Peas
911210010050LunaLuna Chick Peas 400 Gm
Sheet1


In H3 control+shift+enter, not just enter, copy across, and down:

=SUM(IF(FREQUENCY(IF(1-($B$2:$B$9=""),IF($A$2:$A$9=$G3,IF($C$2:$C$9=H$2,MATCH($B$2:$B$9,$B$2:$B$9,0)))),ROW($A$2:$A$9)-ROW($A$2)+1),1))
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,262
Messages
6,171,080
Members
452,377
Latest member
bradfordsam

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