# COUNTIF OR COUNTIFS - HELP!



## BeerBeer101 (Jan 4, 2023)

OK, simply looking to count if...




return in F4 - the number of brown in column B if Black is in Column C...
as always - I appreciate the help - COUNTIF and COUNTIFS are not working.
thanks


----------



## DanteAmor (Jan 4, 2023)

Try this:

Dante AmorABCDEFG12Data 1Data 23BrownBlackBlackWhite4RedWhiteBrown305OrangeWhiteGreen106RedWhiteOrange017GreenBlackRed028BrownBlack9BrownBlackHoja4Cell FormulasRangeFormulaF4:G7F4=COUNTIFS($B:$B,$E4,$C:$C,F$3)

*NOTE XL2BB:*
For the future, it would help greatly if you could give us the sample data in a form that we can copy to test with, rather that a picture.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: *XL2BB Add-in*
Note that there is also a "*Test Here*” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.


----------



## sheetspread (Jan 4, 2023)

The pivot table does this also


----------



## DanteAmor (Jan 4, 2023)

delete


----------



## BeerBeer101 (Jan 4, 2023)

DanteAmor said:


> Try this:
> 
> Dante AmorABCDEFG12Data 1Data 23BrownBlackBlackWhite4RedWhiteBrown305OrangeWhiteGreen106RedWhiteOrange017GreenBlackRed028BrownBlack9BrownBlackHoja4Cell FormulasRangeFormulaF4:G7F4=COUNTIFS($B:$B,$E4,$C:$C,F$3)
> 
> ...


My bad... here is what I was trying:

=COUNTIFS($B:$B,$E4)*($C:$C,F$3)
or
=COUNTIFS($B:$B,$E4),($C:$C,F$3)

forgive me, I'm still new here. thanks!


----------

