我正在尝试创建一个公式,以确定是否根据通话日期和时间在营业时间内或之外拨打电话
营业时间为周一至周五上午8点至晚上8点,周六上午8点至下午2点。
基本上我需要为is创建公式;
如果电话是星期一,星期二,星期三,星期四,星期五,时间是> 8< 20或者电话是星期六,时间是> 8< 14然后显示“Inside Business Hours”
其他一切都显示“营业时间外”
由于
答案 0 :(得分:1)
这个公式应该足够了:
=IF(AND(WEEKDAY(A2)>1,MOD(A2,1)*24>=8,MOD(A2,1)*24<=IF(WEEKDAY(A2)=7,14,20)),"In","Out")
答案 1 :(得分:0)
日期和时间在A2:04.09.2017 20:00:00
这是公式:
=IF(AND(TIME(HOUR(A2);MINUTE(A2);SECOND(A2)) > VLOOKUP(WEEKDAY(A2);E$2:G$8;2;FALSE)/24;TIME(HOUR(A2);MINUTE(A2);SECOND(A2)) < VLOOKUP(WEEKDAY(A2);E$2:G$8;3;FALSE)/24); "inside"; "outside")
我希望我的英文名字正确无误。这是我的德国原版:
=WENN(UND(ZEIT(STUNDE(A2);MINUTE(A2);SEKUNDE(A2)) > SVERWEIS(WOCHENTAG(A2);E$2:G$8;2;FALSCH)/24;ZEIT(STUNDE(A2);MINUTE(A2);SEKUNDE(A2)) < SVERWEIS(WOCHENTAG(A2);E$2:G$8;3;FALSCH)/24); "inside"; "outside")
答案 2 :(得分:0)
您可以尝试以下公式。
=IF(AND(WEEKDAY(A1)>1,WEEKDAY(A1)<7),IF(AND(A1-INT(A1)>=TIMEVALUE("08:00 AM"),A1-INT(A1)<=TIMEVALUE("08:00 PM")),"Inside Business Hours","Outside Business Hours"),IF(WEEKDAY(A1)=7,IF(AND(A1-INT(A1)>=TIMEVALUE("08:00 AM"),A1-INT(A1)<=TIMEVALUE("02:00 PM")),"Inside Business Hours","Outside Business Hours"),"Outside Business Hours"))
参见图片以供参考。
在上面的公式中,
WEEKDAY(A2)
会给出星期几(默认情况下,星期日为1,星期六为7)A2-INT(A2)
将从Time
单元格DataTime
TIMEVALUE("08:00 AM")
将在字符串答案 3 :(得分:0)
如果您的日期是从单元格A2
开始,请在单元格B2
中输入此公式并将其拖到底部。您的日期应采用此格式9/16/2017 1:05:00 PM
。
=IF(WEEKDAY(A2,2)=7,"Outside of Business hours",IF(WEEKDAY(A2,2)=6,IF(AND(MOD(A2,1)<TIME(14,0,0),MOD(A2,1)>TIME(8,0,0)),"Inside Business Hours","Outside of Business Hours"),IF(AND(MOD(A2,1)<TIME(20,0,0),MOD(A2,1)>TIME(8,0,0)),"Inside Business Hours","Outside of Business Hours")))