![]() |
COUNTIF
Let's say I have a range of data from A1:A25 and I want to use the COUNTIF
function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen |
COUNTIF
And these are the words Red and Blue--not the actual colors, right?
=sum(countif(a1:a25,{"Red","Blue"})) or you could each separately: =countif(a1:a25,"Red") + countif(a1:a25,"blue") Karen wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen -- Dave Peterson |
COUNTIF
Hi Karen
In the cell where you want result to be type... If you want the individual total.. =COUNTIF(A1:A25,"Red") In next another totla cell =COUNTIF(A1:A25,"Blue") Or together =COUNTIF(A1:A25,"Red")+COUNTIF(A1:A25,"Blue") Hope this helps, Gav. "Karen" wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen |
COUNTIF
=COUNTIF(A1:A25,"Red")
=COUNTIF(A1:A25,"Blue") -- Gary''s Student - gsnu200752 |
COUNTIF
On Oct 31, 8:44 am, Karen wrote:
Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen Try... =COUNTIF(A1:A25,"Red")+COUNTIF(A1:A25,"Blue") or =SUM(COUNTIF(A1:A25,{"Red","Blue"})) Hope this helps! |
COUNTIF
=SUMPRODUCT(N(A1:A25={"Blue","Red"}))
"Karen" wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen |
COUNTIF
Thank you for your help
Karen "Dave Peterson" wrote: And these are the words Red and Blue--not the actual colors, right? =sum(countif(a1:a25,{"Red","Blue"})) or you could each separately: =countif(a1:a25,"Red") + countif(a1:a25,"blue") Karen wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen -- Dave Peterson |
COUNTIF
Thank you for your help
Karen "Gav123" wrote: Hi Karen In the cell where you want result to be type... If you want the individual total.. =COUNTIF(A1:A25,"Red") In next another totla cell =COUNTIF(A1:A25,"Blue") Or together =COUNTIF(A1:A25,"Red")+COUNTIF(A1:A25,"Blue") Hope this helps, Gav. "Karen" wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen |
COUNTIF
Thank you for your help
Karen " wrote: On Oct 31, 8:44 am, Karen wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen Try... =COUNTIF(A1:A25,"Red")+COUNTIF(A1:A25,"Blue") or =SUM(COUNTIF(A1:A25,{"Red","Blue"})) Hope this helps! |
COUNTIF
Thank you for your help
Karen "Teethless mama" wrote: =SUMPRODUCT(N(A1:A25={"Blue","Red"})) "Karen" wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen |
COUNTIF
Thank you for your help
Karen "Gary''s Student" wrote: =COUNTIF(A1:A25,"Red") =COUNTIF(A1:A25,"Blue") -- Gary''s Student - gsnu200752 |
COUNTIF
Yes, these are the words
Thanks "Dave Peterson" wrote: And these are the words Red and Blue--not the actual colors, right? =sum(countif(a1:a25,{"Red","Blue"})) or you could each separately: =countif(a1:a25,"Red") + countif(a1:a25,"blue") Karen wrote: Let's say I have a range of data from A1:A25 and I want to use the COUNTIF function to count how many times 2 different conditions fall within this range. The conditions are "Red" and "Blue" - What would the formula be? I'm assuming I use the COUNTIF function. ANY help would be greatly appreciated, Karen -- Dave Peterson |
COUNTIF
That didn't work for me.
I bet you meant: =SUM(COUNTIF(A1:A25,{"Red","Blue"})) (not an array formula) Alan Beban wrote: Gary''s Student wrote: =COUNTIF(A1:A25,"Red") =COUNTIF(A1:A25,"Blue") Or simply =COUNTIF(A1:A25,{"Red","Blue"}) array entered into a two-column row. Alan Beban -- Dave Peterson |
COUNTIF
Gary''s Student wrote:
=COUNTIF(A1:A25,"Red") =COUNTIF(A1:A25,"Blue") Or simply =COUNTIF(A1:A25,{"Red","Blue"}) array entered into a two-column row. Alan Beban |
COUNTIF
No; I meant =COUNTIF(A1:A25,{"Red","Blue"}) array entered. :-)
Excel 2002. What version are you using? Note that I was responding to Gary's Student (who was proposing one result for each color), not proposing a formula to return the sum. Regards, Alan Dave Peterson wrote: That didn't work for me. I bet you meant: =SUM(COUNTIF(A1:A25,{"Red","Blue"})) (not an array formula) Alan Beban wrote: Gary''s Student wrote: =COUNTIF(A1:A25,"Red") =COUNTIF(A1:A25,"Blue") Or simply =COUNTIF(A1:A25,{"Red","Blue"}) array entered into a two-column row. Alan Beban |
COUNTIF
xl2003.
If I select the cell and highlight the formula in the formulabar, then hit F9, I see: ={2,1} with two Red's and one Blue in A1:A25 If there are no Red's in the range, I see 0 in the cell. If I do the same thing (evaluate the formula), I see: ={0,1} Alan Beban wrote: No; I meant =COUNTIF(A1:A25,{"Red","Blue"}) array entered. :-) Excel 2002. What version are you using? Note that I was responding to Gary's Student (who was proposing one result for each color), not proposing a formula to return the sum. Regards, Alan Dave Peterson wrote: That didn't work for me. I bet you meant: =SUM(COUNTIF(A1:A25,{"Red","Blue"})) (not an array formula) Alan Beban wrote: Gary''s Student wrote: =COUNTIF(A1:A25,"Red") =COUNTIF(A1:A25,"Blue") Or simply =COUNTIF(A1:A25,{"Red","Blue"}) array entered into a two-column row. Alan Beban -- Dave Peterson |
All times are GMT +1. The time now is 05:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com