Testing for an error in a range of cells...

  • Thread starter Thread starter jfk683
  • Start date Start date
J

jfk683

I searched through the previous posts on this topic, but have almost
no experience using VBA in excel, so I was wondering if there was a
simpler way to achieve this:

I want to write a formula in B2 that will basically say, "If the range
of cells B3 to B24 contains an error, return x if true, and return y
if false."

I know how to do this for a specific cell rather than a range, for
example (=IF(ISERROR(B2),"x","y").

Any help in achieving this without delving into VBA would be much
appreciated (I just don't have the time to start learning this stuff
as I am working full time and studying for the CFA; I also don't like
to half-a$$ stuff).

Thanks.

John
 
=IF(SUMPRODUCT(--(ISERROR(B3:B24))),"X","Y")

What is "-a$$ stuff" and why do you not like it?
best wishes
 
Hi,

Since errors propogate this is a short solution

=IF(ISERROR(SUM(F1:F24)),"x","Y")
 
Great solution!
--
Gary''s Student - gsnu200811


ShaneDevenshire said:
Hi,

Since errors propogate this is a short solution

=IF(ISERROR(SUM(F1:F24)),"x","Y")
 
Back
Top