if then

V

vdmbqb

I need a formula for cell B1.
If cell A1 is greater than 0 enter that value in b1.

I will be using this formula to teach myself the basics of if then formulas
 
G

Gaurav

=IF(A1>0,1,"")

This will return 1 if the value in A1 is greater than 0 and Blank if it is
not greater than 0.
 
T

Teethless mama

Your formula will fail if A1 contain text

Here is the correction:
=IF(AND(ISNUMBER(A1),A1>0),A1,"")
 
R

Rick Rothstein \(MVP - VB\)

This also seems to work...

=IF(MAX(A1,0)>0,A1,"")

Rick


Teethless mama said:
Your formula will fail if A1 contain text

Here is the correction:
=IF(AND(ISNUMBER(A1),A1>0),A1,"")
 

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