Count number of lines based on text and number criteria, without duplicates

HVCompleto

New Member
Joined
Aug 28, 2017
Messages
5
Hello! New user here!
I've been trying to figure out for a day and can't seem to find any help on any thread for this, so I decided to post a new one.
Below is the sample database for my problem. The final goal is to have a cell that returns the number of times a unique brand (Column A with no duplicates) is in Store (column B = YES) and with values below 0 (Column C <0).
So in this case, the cell should return 3!

:confused::confused::confused::confused:

BrandIn store? Value
3myes-300
3mno0
3myes-233
3mno200
aegyes0
aegno-200
aegyes-300
aegno-200
boschyes-100
boschno0
boschyes-50
boschno-500
osakayes0
osakano-20
osakayes0
osakano-100

<tbody>
</tbody>
 

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).
maybe something like...

Excel 2016 (Windows) 32 bit
ABCDE
1BrandIn store?Value
23myes-3003
33mno0
43myes-233
53mno200
6aegyes0
7aegno-200
8aegyes-300
9aegno-200
10boschyes-100
11boschno0
12boschyes-50
13boschno-500
14osakayes0
15osakano-20
16osakayes0
17osakano-100

<tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
E2{=SUM(IF(FREQUENCY(IF(A2:A17<>"",IF(B2:B17="yes",IF(C2:C17<0,MATCH(A2:A17,A2:A17,0)))),ROW(A2:A17)-ROW(A2)+1),1))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,488
Messages
6,125,092
Members
449,206
Latest member
ralemanygarcia

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