Distinguish Letters vs. Numbers in an IF Statement

  • Thread starter Thread starter William Wolfe
  • Start date Start date
W

William Wolfe

I need to write an IF statement so that if the contents of a cell are a
letter do one thing, it they are a number do another.

How do I distinguish between the two in an IF statement?

Thanks,

W. Wolfe
 
Hi,

Try this

=IF(ISNUMBER(A1),"Do number things",IF(NOT(ISBLANK(A1)),"Do text things","Do
neither, it's blank"))

Mike
 
I need to write an IF statement so that if the contents of a cell are a
letter do one thing, it they are a number do another.

How do I distinguish between the two in an IF statement?

Thanks,

W. Wolfe

=if(isnumber(cell_ref),"do this","do that")
--ron
 
Use the ISNUMBER function...

=IF(A1="","I'm blank",IF(ISNUMBER(A1),"I'm a number","I'm text"))
 
Thanks for your quick response.

W. Wolfe


Rick Rothstein said:
Use the ISNUMBER function...

=IF(A1="","I'm blank",IF(ISNUMBER(A1),"I'm a number","I'm text"))
 
Back
Top