date/time in a cell is after 5Pm friday and before 3PM Sunday

derickj

New Member
Joined
Oct 11, 2008
Messages
36
I need to create a formula in excel to evaluate if the date/time in a cell (opened) is after 5Pm friday and before 3PM Sunday. Can someone help?

Number​
After Friday 5PM and Before Sunday 3PM
Opened​
INC2632724​
2020-08-01 08:55:44​
INC2632725​
2020-08-01 09:37:55​
INC2632762​
2020-08-01 11:56:51​
INC2633319​
2020-08-02 07:45:33​
INC2634522​
2020-08-02 11:24:01​
INC2633588​
2020-08-02 19:37:06​
INC2634252​
2020-08-02 23:26:58​
INC2634365​
2020-08-03 00:10:05​
INC2634427​
2020-08-03 00:31:15​
INC2634430​
2020-08-03 00:32:57​
INC2634456​
2020-08-03 00:42:48​
 

Attachments

  • 1635530827365.png
    1635530827365.png
    22.6 KB · Views: 9

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
MrExcelPlayground4.xlsx
ABC
31NumberAfter Friday 5PM and Before Sunday 3PMOpened
32INC2632724Yes2020-08-02 14:01:44
33INC2632725No2020-08-02 21:37:55
34INC2632762Yes2020-08-01 11:56:51
Sheet26
Cell Formulas
RangeFormula
B32:B34B32=IF(AND(WEEKDAY(C32,15)+MOD(C32,1)>=1.70833,WEEKDAY(C32,15)+MOD(C32,1)<=3.625),"Yes","No")
 
Upvote 0
MrExcelPlayground4.xlsx
ABC
31NumberAfter Friday 5PM and Before Sunday 3PMOpened
32INC2632724Yes2020-08-02 14:01:44
33INC2632725No2020-08-02 21:37:55
34INC2632762Yes2020-08-01 11:56:51
Sheet26
Cell Formulas
RangeFormula
B32:B34B32=IF(AND(WEEKDAY(C32,15)+MOD(C32,1)>=1.70833,WEEKDAY(C32,15)+MOD(C32,1)<=3.625),"Yes","No")
thanks
 
Upvote 0
MrExcelPlayground4.xlsx
ABC
31NumberAfter Friday 5PM and Before Sunday 3PMOpened
32INC2632724Yes2020-08-02 14:01:44
33INC2632725No2020-08-02 21:37:55
34INC2632762Yes2020-08-01 11:56:51
Sheet26
Cell Formulas
RangeFormula
B32:B34B32=IF(AND(WEEKDAY(C32,15)+MOD(C32,1)>=1.70833,WEEKDAY(C32,15)+MOD(C32,1)<=3.625),"Yes","No")
I need to stop time to by 1PM instead of 3PM. What does 3.625 need to change to?
 
Upvote 0
You have to look into the "WEEKDAY" function. I use argument '15' to mean that Friday = 1 and Thursday =7 of each week.
So Sunday is 3. Sunday at noon is 3.5. Sunday at 1:00PM is 3+13/24.

I'm mostly rusty on this problem.
 
Upvote 0
=IF(AND(WEEKDAY(C5,15)+MOD(C5,1)>=1.75,WEEKDAY(C5,15)+MOD(C5,1)<=3.5417),"Yes","No") I think
 
Upvote 0
You have to look into the "WEEKDAY" function. I use argument '15' to mean that Friday = 1 and Thursday =7 of each week.
So Sunday is 3. Sunday at noon is 3.5. Sunday at 1:00PM is 3+13/24.

I'm mostly rusty on this problem.
I think I understand the logic and this revised functions seems to work for the new parameters
=IF(AND(WEEKDAY(C5,15)+MOD(C5,1)>=1.75,WEEKDAY(C5,15)+MOD(C5,1)<=3.5417),"Yes","No")
Thanks for all your help
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

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