ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   countif help (https://www.excelbanter.com/excel-discussion-misc-queries/80529-countif-help.html)

saybut

countif help
 

Hi,

Could anyone tell me how to/if its possible to use count if but specify
several criteria for the same count?

I currently have one =countif(E:E,"DAR") I'm trying to sum up, "DAR",
"DAC", "DAO" in the same cell. I thought something like
=countif(E:E,"DAR","DAC","DAO") but it doesnt work & I can't figure out
what to do!

any help is greatly appreciated.


--
saybut
------------------------------------------------------------------------
saybut's Profile: http://www.excelforum.com/member.php...fo&userid=5949
View this thread: http://www.excelforum.com/showthread...hreadid=528093


Ron Coderre

countif help
 

Try this:

A1: =SUMPRODUCT(COUNTIF(E:E,{"DAR","DAC","DAO"}))

(Note the curly braces around the criteria array)

Does that help?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=528093



countif help
 
Hi

Use three separate COUNTIFs and add them together:
=countif(E:E,"DAR") + countif(E:E,"DAO") + countif(E:E,"DAC")

Andy.

"saybut" wrote in
message ...

Hi,

Could anyone tell me how to/if its possible to use count if but specify
several criteria for the same count?

I currently have one =countif(E:E,"DAR") I'm trying to sum up, "DAR",
"DAC", "DAO" in the same cell. I thought something like
=countif(E:E,"DAR","DAC","DAO") but it doesnt work & I can't figure out
what to do!

any help is greatly appreciated.


--
saybut
------------------------------------------------------------------------
saybut's Profile:
http://www.excelforum.com/member.php...fo&userid=5949
View this thread: http://www.excelforum.com/showthread...hreadid=528093




saybut

countif help
 

Hi Ron,

thats brilliant thanks. It works a treat. I don't know if you changed
your post but it came through on email as "sumproduct" rather than just
"sum". The both do the same though.

Thanks again.

mark.


--
saybut
------------------------------------------------------------------------
saybut's Profile: http://www.excelforum.com/member.php...fo&userid=5949
View this thread: http://www.excelforum.com/showthread...hreadid=528093


Ron Coderre

countif help
 

Mark

Thanks for the feedback...I'm glad that worked for you.

Yeah...I edited the post to change it from SUMPRODUCT to SUM.
I thought I could finish the edit before the forum posted up to the
newsgroups...but, evidently not.

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=528093



All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com