time counting

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
460
Office Version
  1. 2019
hello, everyone, is there any IF statement that i can use on below time range when counting start/end time and return correct or out of range?

request timegiven timereturn
09:00-18:3009:00-18:00correct
09:00-16:3009:00-19:00out of range
13:00-21:0012:00-21:00out of range

<tbody>
</tbody>

thanks in advance
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
hello, everyone, is there any IF statement that i can use on below time range when counting start/end time and return correct or out of range?

request timegiven timereturn
09:00-18:3009:00-18:00correct
09:00-16:3009:00-19:00out of range
13:00-21:0012:00-21:00out of range

<tbody>
</tbody>

thanks in advance

C2:
Code:
=IF(AND(--LEFT(B2,5)>=--LEFT(A2,5),--RIGHT(B2,5)<=--RIGHT(A2,5)),"correct","out of range")
 
Last edited:
Upvote 0
Try this:


=IF(SUM(IF(LEFT(B2,5)>=LEFT(A2,5),1,0),IF(RIGHT(B2,5)<=RIGHT(A2,5),1,0))=2,"CORRECT","OUT OF RANGE")
 
Upvote 0
C2:
Code:
=IF(AND(--LEFT(B2,5)>=--LEFT(A2,5),--RIGHT(B2,5)<=--RIGHT(A2,5)),"correct","out of range")

this is much more prefect, thank you CryusTheVirus & mrshl9898

what if i combine with this, is it work in one cell?
=IF(OR(A5="full",A5="0"),A5,"")

thanks in advance again
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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