Certain times formula

Excelexcel86

Board Regular
Joined
Feb 28, 2023
Messages
99
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi what formula can be used to see if a time is between 06:00 and 14:30
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Assume A1 is timestamp
use:
=AND(A1>=TIME(6,0,0),A1<=TIME(14,30,0))
Or
=AND(MOD(A1,0)>=TIME(6,0,0),MOD(A1,0)<=TIME(14,30,0))
if A1 is Date-Time
 
Upvote 0
Tried the bottom one but it’s saying the formula is missing an opening or closing parenthesis

Also should it be =if(and ath the start
 
Upvote 0
Thanks can I make that a if and command so I can put what I want to happen if true
 
Upvote 0
How about
Excel Formula:
=IF(MEDIAN(MOD(A1,1),TIME(6,0,0),TIME(14,30,0))=MOD(A1,1),"Y","N")
 
Upvote 0
How about
Excel Formula:
=IF(MEDIAN(MOD(A1,1),TIME(6,0,0),TIME(14,30,0))=MOD(A1,1),"Y","N")
Hi that works great but now the problem is if the time is over that and goes into the next day it reads it as true and gives me a high value in time how can the formula be adjusted to have it in the same day also ?
 
Upvote 0
I have no idea what you mean, either the time is between 6:00 & 14:30 or it isn't the day has nothing to do with it.
 
Upvote 0
Item came in warehouse item left warehouse hours during work hours
03/03/2022 06.0004/022022 10.00 should be 8.30 hours

Hi if u look at the example above what I mean is using that formula because it’s gone into another day it calculates all the way till 10.00 next morning when it left the warehouse so it’s showing 16hours because in cell c3 I’m using b2-a2 . So with the formula u gave me can you use an if and command with it to see if the two days are the same as well because if not are true the formula will work I just don’t know how to do this
 
Upvote 0
The formula simply shows Yes or No depending on the time, it does not return the number of hours.
 
Upvote 0

Forum statistics

Threads
1,215,297
Messages
6,124,107
Members
449,142
Latest member
championbowler

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