IF & AND Excel Statment/s - New User Help Needed

MRV100

New Member
Joined
May 13, 2013
Messages
2
Hi, I've got a problem with an IF/And Statement and do not know if this the correct function to use.

Basically I'm trying to say two things in Cell E2:

IF the date in column C2 is greater than column A2 it is Late, if not its on time AND If the time in column D2 is greater than column B2 it is Late, if not its on time.

So far I've come up with this formula =IF(AND(C2>A2,D2>B2),"LATE","ONTIME")

However the problem I have is that when the dates in Column A2 & C2 both match but the time in Column D2 is greater than the one in Column B2 it is still showing up as ontime when it should be late which is puzzling.

I've tried two IF(And(.. statements back to back as well as standard If statments back to back which didn't work, So i'm confused at the moment

Can anyone help!!:confused:
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
What about something like this rather than the and statement...=IF(C2>A2,"late",IF(D2>B2,"late","on time"))
 
Upvote 0
=IF(OR(C2>A2,D2>B2),"LATE","ONTIME") if you only need one argument to be true to be late then change your AND to an OR.
 
Upvote 0
What about something like this rather than the and statement...=IF(C2>A2,"late",IF(D2>B2,"late","on time"))

This Will not work when C col Date is Less Then A col and D col time Greater then B col it will show late bcoz 2nd condition met but in this case need to show"ontime"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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