Formula needed to count repeated data based on criterias

Cheslop84

New Member
Joined
Aug 24, 2016
Messages
5
Hi

I need a formula that will count how many styles I am carrying per brand. The table array where I hold my data is shown below, cells A-D.

Cell B states the name on the style, cell A is the size breakdown for that particular style.
Cell C shows the brand attached to that style

Cell D is stock holding for the individual sizes of that style.

What I am looking to do is count how many styles I have in stock based on the brand (which will alternate as I am using a list function from validation which I can then scroll through to display data for the brand of my choosing) and also the style has to have a qty of > 0. That's a qty of >0 for the whole style, not just the individual sizes.

For example, from below, if K33076Dress32849Rasb/Cream was qty 0 for each size then I wouldnt want it to count the style, but if just one size has a qty, I would like it would count it.

Hope someone can help

Thanks

[TABLE="width: 593"]
<tbody>[TR]
[TD="class: et3, width: 288"]KA3076 Dress 32849 Rasberry/Cream S[/TD]
[TD="class: et3, width: 64"]KA3076Dress32849Rasb/Cream[/TD]
[TD="class: et3, width: 190"]Glamorous Old[/TD]
[TD="class: et3, width: 51"]2[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]KA3076 Dress 32849 Rasberry/Cream M[/TD]
[TD="class: et4, width: 64"]KA3076Dress32849Rasb/Cream[/TD]
[TD="class: et4, width: 190"]Glamorous Old[/TD]
[TD="class: et4, width: 51"]-1[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]KA3076 Dress 32849 Rasberry/Cream L[/TD]
[TD="class: et3, width: 64"]KA3076Dress32849Rasb/Cream[/TD]
[TD="class: et3, width: 190"]Glamorous Old[/TD]
[TD="class: et3, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]CK0550 Dress 32029 Rust XS[/TD]
[TD="class: et4, width: 64"]CK0550Dress32029Rust[/TD]
[TD="class: et4, width: 190"]Glamorous Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]CK0550 Dress 32029 Rust S[/TD]
[TD="class: et3, width: 64"]CK0550Dress32029Rust[/TD]
[TD="class: et3, width: 190"]Glamorous Old[/TD]
[TD="class: et3, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]CK0550 Dress 32029 Rust M[/TD]
[TD="class: et4, width: 64"]CK0550Dress32029Rust[/TD]
[TD="class: et4, width: 190"]Glamorous Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]CK0550 Dress 32029 Rust L[/TD]
[TD="class: et3, width: 64"]CK0550Dress32029Rust[/TD]
[TD="class: et3, width: 190"]Glamorous Old[/TD]
[TD="class: et3, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]1393 Ladies dress-32322 Black/mustard XS[/TD]
[TD="class: et4, width: 64"]AN1393dress-32322Blk/mustard[/TD]
[TD="class: et4, width: 190"]Glamorous Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]N1393 Ladies dress-32322 Black/mustard S[/TD]
[TD="class: et3, width: 64"]AN1393dress-32322Blk/mustard[/TD]
[TD="class: et3, width: 190"]Glamorous Old[/TD]
[TD="class: et3, width: 51"]1[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]N1393 Ladies dress-32322 Black/mustard M[/TD]
[TD="class: et4, width: 64"]AN1393dress-32322Blk/mustard[/TD]
[TD="class: et4, width: 190"]Glamorous Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]N1393 Ladies dress-32322 Black/mustard L[/TD]
[TD="class: et3, width: 64"]AN1393dress-32322Blk/mustard[/TD]
[TD="class: et3, width: 190"]Glamorous Old[/TD]
[TD="class: et3, width: 51"]1[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]Fur Collar Coat Green S[/TD]
[TD="class: et4, width: 64"]FurCollarCoatGreen[/TD]
[TD="class: et4, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]Fur Collar Coat Green M[/TD]
[TD="class: et3, width: 64"]FurCollarCoatGreen[/TD]
[TD="class: et3, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et3, width: 51"]-1[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]Fur Collar Coat Green L[/TD]
[TD="class: et4, width: 64"]FurCollarCoatGreen[/TD]
[TD="class: et4, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et4, width: 51"]1[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]Fur Collar Coat Green XL[/TD]
[TD="class: et3, width: 64"]FurCollarCoatGreen[/TD]
[TD="class: et3, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et3, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]Fur Collar Coat Green XS[/TD]
[TD="class: et4, width: 64"]FurCollarCoatGreen[/TD]
[TD="class: et4, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]NL2785 Ladies Parka Khaki 8[/TD]
[TD="class: et3, width: 64"]NL2785ParkaKhaki[/TD]
[TD="class: et3, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et3, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]NL2785 Ladies Parka Khaki 10[/TD]
[TD="class: et4, width: 64"]NL2785ParkaKhaki[/TD]
[TD="class: et4, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et4, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et3, width: 288"]NL2785 Ladies Parka Khaki 12[/TD]
[TD="class: et3, width: 64"]NL2785ParkaKhaki[/TD]
[TD="class: et3, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et3, width: 51"]0[/TD]
[/TR]
[TR]
[TD="class: et4, width: 288"]NL2785 Ladies Parka Khaki 14[/TD]
[TD="class: et4, width: 64"]NL2785ParkaKhaki[/TD]
[TD="class: et4, width: 190"]Fast Fashion Womens Old[/TD]
[TD="class: et4, width: 51"]2[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

Please test the following solution:


Excel 2016 (Windows) 64 bit
ABCDEF
1KA3076 Dress 32849 Rasberry/Cream SKA3076Dress32849Rasb/CreamGlamorous Old2brand# of styles
2KA3076 Dress 32849 Rasberry/Cream MKA3076Dress32849Rasb/CreamGlamorous Old-1Fast Fashion Womens Old2
3KA3076 Dress 32849 Rasberry/Cream LKA3076Dress32849Rasb/CreamGlamorous Old0
4CK0550 Dress 32029 Rust XSCK0550Dress32029RustGlamorous Old0
5CK0550 Dress 32029 Rust SCK0550Dress32029RustGlamorous Old0
6CK0550 Dress 32029 Rust MCK0550Dress32029RustGlamorous Old0
7CK0550 Dress 32029 Rust LCK0550Dress32029RustGlamorous Old0
81393 Ladies dress-32322 Black/mustard XSAN1393dress-32322Blk/mustardGlamorous Old0
9N1393 Ladies dress-32322 Black/mustard SAN1393dress-32322Blk/mustardGlamorous Old1
10N1393 Ladies dress-32322 Black/mustard MAN1393dress-32322Blk/mustardGlamorous Old0
11N1393 Ladies dress-32322 Black/mustard LAN1393dress-32322Blk/mustardGlamorous Old1
12Fur Collar Coat Green SFurCollarCoatGreenFast Fashion Womens Old0
13Fur Collar Coat Green MFurCollarCoatGreenFast Fashion Womens Old-1
14Fur Collar Coat Green LFurCollarCoatGreenFast Fashion Womens Old2
15Fur Collar Coat Green XLFurCollarCoatGreenFast Fashion Womens Old0
16Fur Collar Coat Green XSFurCollarCoatGreenFast Fashion Womens Old0
17NL2785 Ladies Parka Khaki 8NL2785ParkaKhakiFast Fashion Womens Old0
18NL2785 Ladies Parka Khaki 10NL2785ParkaKhakiFast Fashion Womens Old0
19NL2785 Ladies Parka Khaki 12NL2785ParkaKhakiFast Fashion Womens Old0
20NL2785 Ladies Parka Khaki 14NL2785ParkaKhakiFast Fashion Womens Old2
Sheet3
Cell Formulas
RangeFormula
F2{=SUM(($D$1:$D$20>0)*IFERROR(1/COUNTIFS($C$1:$C$20,E2,$D$1:$D$20,">0",$B$1:$B$20,$B$1:$B$20),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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