Having trouble with =IF formula

CLRead

New Member
Joined
Mar 16, 2018
Messages
7
Hello All,
Would like to see if someone can help me with the following issue:

I am comparing the information typed into cells D61, 62, 63, 64, 65 to the static information in cells C61, 62, 63, 64, 65.

This is how the static information appears in the C cells:
C61 has 2:00
C62 has 3:00
C63 has 4:00
C64 has 8:30
C65 has 10:30

I used =IF(D61<=C61,"YES","NO") in the equivalent E cells and copied it down to E65 so if the manually entered info in the D cells was equal to or less than the C cells I would get YES and if it was greater than I would get a NO.

Works perfectly on all except when comparing D65 to C65. As long as anything between 10:00 and 10:30 is entered I get a YES but if anything else is entered I get a NO even when it is less than 10:30. All info is formatted as text.
 
Hi!

Try the formulas below:

=IF(--D61 <= --C61,"YES","NO")

or

=IF(TIMEVALUE(D61) <= TIMEVALUE(C61),"YES","NO")

Markmzz
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
The BEST way is to correct the info and change them to Formats like General, Number, Time, etc., but if you can't or don't want to do that, then this might work:


Book1
CDE
612:001:00YES
623:001:30YES
634:004:35NO
648:308:45NO
6510:309:59YES
Sheet26
Cell Formulas
RangeFormula
E61=IF(TEXT(D61,"hh:mm")+0<=TEXT(C61,"hh:mm")+0,"YES","NO")
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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