"IF" "OR" function?

  • Thread starter Thread starter brian
  • Start date Start date
B

brian

I would like to know how to write a formula that will look
in two different cells and return an answer if there is a
number in either. Here is my example. I would like the
formula to look in cell A2 and if there is any number,
return the word "Car" in cell A1 or if there is a number
in cell A3 return the word "Boat" I would also like to
have A1 blank if there is nothing in either A2 or A3. Is
this possible?


TIA
 
You didn't specify what should happen if there are numbers in both
A2 and A3, so I'll assume only "Car" should be returned:

A1: =IF(ISNUMBER(A2),"Car",IF(ISNUMBER(A3),"Boat",""))

If you need both "Car" and "Boat" to appear if both A2 and A3 have
numbers:

A1: =TRIM(IF(ISNUMBER(A2),"Car","") & " " &
IF(ISNUMBER(A3),"Boat",""))
 
Back
Top