Distinguish Letters vs. Numbers in an IF Statement

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
 
M

Mike H

Hi,

Try this

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

Mike
 
R

Ron Rosenfeld

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
 
R

Rick Rothstein

Use the ISNUMBER function...

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

William Wolfe

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"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top