Help with if formula with multiple conditions

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
888
Office Version
  1. 365
Platform
  1. Windows
i am hoping someone can help me with an IF formula that has multiple conditions. I have tried a few different ways but still I cannot get it to work.


What I require is

if A2="0" then return a blank
if L2 ="0" then return a blank
If A2>L2 return "Late"
If A2 is <=L2 then return "on time"

=IF(A2="0","",IF(L2="0","",IF(A2>L2,"Late",IF(A2<=L2,"On Time",""))))

I do not have the raw data yet and am just preparing a spreadsheet for it so I am not sure if some of the cells will be blanks or "0" so I need a formula that I can adjust between the two

=IF(A2="","",IF(L2="","",IF(A2>L2,"Late",IF(A2<=L2,"On Time",""))))

These formulas do not work but I have enclosed them to give you an idea.

Thank you to anyone who can help! :)

Carla
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
An empty cell will be treated the same as zero (so they are as treated-one-and-the-same).
Try:
Code:
=IF(OR(A2=0,L2=0),"",IF(A2>L2,"Late","On Time"))
 
Last edited:
Upvote 0
How about
=IF(OR(A2=0,L2=0),"",IF(A2>L2,"Late","On-Time"))
 
Upvote 0
Even if the 0 comes through as text?
No, but then try:
Code:
=IF(OR(A2=0,A2="0",L2=0,L2="0"),"",IF(A2>L2,"Late","On Time"))
 
Upvote 0
The formula doesnt seem to be recognizing which items are late and labeled everything as on time.

A2 and K2 had the following data but came through as "On Time"

2018-07-012018-06-08

<tbody>
</tbody>
 
Upvote 0
Are your dates actually entered as Dates, or are those Text too?
Is that date format "yyyy-mm-dd" or "yyyy-dd-mm"?
 
Upvote 0
I am not at a location where I can download the file in order to look at it.
Perhaps someone else will be able to take a look at it. Otherwise, it will need to wait until I am at home where I can download the file.
 
Upvote 0
Column D is text not dates, hence the problem.
Try
=IF(OR(C2="0",D2="0"),"",IF(C2< DATEVALUE(D2),"Late","On Time"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top