SOLVED

Run a formula only when 1 or more cells are not blank

Occasional Contributor
I have a formula
=IF(BH4<=AR4+180,{"MET"},{NOT MET"})

I want to add in not to calculate if there is no value in BH4 OR AR4.

Can you help?
12 Replies

@Lala56 

 

=IF(OR(BH4="",AR4=""),"",IF(BH4<=AR4+180,"MET","NOT MET"))

@Lala56 

Perhaps

=IF (BH4<>"")+(AR4<>""), "",
 IF(BH4<=AR4+180,"MET",NOT MET")
)
Thank you very much for your help. I used your formula =IF(OR(BH4="",AR=""),"",IF(BH4<=AR4+180,"Met","Not Met")) but it gives me the #NAME? error message. I checked the equation several times for a typo but can't find one. I'm still stuck
Thank you so much for your help. I am getting a #VALUE error. I plugged dates in both the fields and I still get #Value instead of met or not met and when I remove the values I still get #Value
best response confirmed by allyreckerman (Microsoft)
Solution

@Lala56 

You have

=IF(OR(BH4="",AR=""),"",IF(BH4<=AR4+180,"MET","NOT MET"))

but it should be

=IF(OR(BH4="",AR4=""),"",IF(BH4<=AR4+180,"MET","NOT MET"))

Thank you so much, it worked! For some reason the very 1st row did not calculate and left the cell with #VALUE! yet the other 60K records are correct.

@Lala56 

Could one of the cells contain a text value instead of a number?

They ate dates with added days?

@Lala56 

I'm sorry, I don't understand.

If you wish, you can attach a small sample workbook that demonstrates the problem.

Good Morning Hans, could you help me with adding another argument? I keep getting too many arguments. I would like to add If BR4 value = "Met" then "N/A"

Can you help?

@Lala56 

=IF(BR4="Met","N/A",IF(OR(BH4="",AR4=""),"",IF(BH4<=AR4+180,"MET","NOT MET")))

It worked thank you so much. Take care