Count If Conditions Are Trus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a spreadsheet with various values in a1:r1 and a2:r2, I want to count when a1 is greater than six and a2 is less than thirty (i.e. when both are true not either or). I initially did an IF statement which is fine and then a calculation at the end, however, it's not too smart and I thought there must be a better way. I thought about an array but that may as well be greek to me, I also thought it might work with an AND statement in a countif but am having no joy. Can anyone help

Thanks

Best Regards

CalumMurdo Kennedy
 
Hi
Try:

=COUNTIF(A1:R1,{">6","<30"})
Regards
Michael
-----Original Message-----
Hi,

I have a spreadsheet with various values in a1:r1 and
a2:r2, I want to count when a1 is greater than six and a2
is less than thirty (i.e. when both are true not either
or). I initially did an IF statement which is fine and
then a calculation at the end, however, it's not too smart
and I thought there must be a better way. I thought about
an array but that may as well be greek to me, I also
thought it might work with an AND statement in a countif
but am having no joy. Can anyone help?
 
Michael,

I was not aware that this worked, and testing it suggests that it doesn't.
Apart from omitting row 2, are you saying that this is and AND condition for
6 and <30?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thanks Guys,

I wasn't familiar with that formula, another one to learn I guess :-) oh well, that's what sunday nights are for!
Thank you,

CalumMurdo Kennedy
 
Hi Bob
Your right....and it's only Monday. I don't where that
came from. Yes, the AND condition was required.
I need more coffee.
Regards
Michael
 
Back
Top