If and Contains formulas

Greenbea

New Member
Joined
Oct 24, 2013
Messages
3
Working in excel 2010

Looking for a formula which will show if the "Union Notification Date" in cell A2 was received prior to when the work commenced as outlined in "StartDate" cell B2 and "Start Time" cell C2.

The closest I can come up with is using: =IF(ISNUMBER(SEARCH(("*B2*"),A2)),"On Time","Late")

I think the logic is there, but perhaps the date & time formulas are causing problems.
A
B
C
D
1
Union Notification Date
Start Date
Start Time
Late/On Time
2
10/22/2013 6:26:24 AM
10/22/2013
7:00

<TBODY>
</TBODY>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Thanks Board Regular! The formula is accepted without errors, however it is telling me all of the records (3500+) are On Time....
 
Upvote 0
Are the dates and time columns really date entries or are they text strings that look like dates/times? For me copying your sample to my workbook, I got "Late".
 
Upvote 0
they're text strings... we broke them out using =IF(B6=3,LEFT(A6,10),LEFT(A6,9)), then converted them to a date value, then checked if they were occuring on the same day =IF(G6<D6,"Late","CheckSameDay") and now just running a time calc to see if the time is occuring later.

Kind of the long way of doing things, and not too clean... but I can't seem to see another way around it.
 
Upvote 0
The LEFT() function returns text.. try coercing the results...

=IF(B6=3,LEFT(A6,10),LEFT(A6,9))+0

then format as date or time as desired.
 
Upvote 0

Forum statistics

Threads
1,216,094
Messages
6,128,785
Members
449,468
Latest member
AGreen17

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