Excel conditional formula help

labellaluke

New Member
Joined
Dec 10, 2013
Messages
3
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
Joined
Oct 24, 2012
Messages
3,392
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
Joined
Dec 10, 2013
Messages
3
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
Joined
Oct 24, 2012
Messages
3,392
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
 

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
3,392
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
as i asked earlier

what do you want to do if = 0
 

Forum statistics

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

Some videos you may like

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...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top