# Excel conditional formula help

#### labellaluke

##### New Member
I need to create a formula to do the following:

If B3 is greater than zero, calculate A3+72 (A3 is a date field)
If B3 is less than zero, leave cell blank.

I could also use if B3 is not blank, calculate A3+72
If B3 is blank, leave current cell blank.

I've tried several things but can't make it work. This is my first conditional formula.

Thanks!

#### etaf

##### Well-known Member
what have you tried ?

if B3 is greater than zero than also not blank
so

=If( B3>0, A3+72, "")
should work as for the false b3 is not > than 0 so a blank and less than should work
OR
=IF( OR(B3<0, B3=""), "", A3+72)

what happens if the cell is zero 0

#### labellaluke

##### New Member
what have you tried ?

if B3 is greater than zero than also not blank
so

=If( B3>0, A3+72, "")
should work as for the false b3 is not > than 0 so a blank and less than should work
OR
=IF( OR(B3<0, B3=""), "", A3+72)

what happens if the cell is zero 0
This is what I did and it doesn't do the calculation. It just displays =A3+72.
=IF(B3>0,"[=A3+72]","0")

#### etaf

##### Well-known Member
By putting in "" you are changing to text in an IF formula
same for the zero "0" thats text

=IF(B3>0,"[=A3+72]","0")
change to
=IF(B3>0,A3+72,0)
as i posted

#### labellaluke

##### New Member
I figured it out.

=IF(B7>0,A7+72,IF(B7<0,"none"))

#### etaf

##### Well-known Member
I assume you are trying to avoid 0 - if you put zero into B7 , then you will get FALSE , as you dont have a condition for a false in the 2nd nested IF

what do you want to do if = 0

1,082,298
Messages
5,364,377
Members
400,795
Latest member
Vercas

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...