发布网友 发布时间:2022-05-09 21:46
共4个回答
热心网友 时间:2023-10-22 22:26
在C2单元格输入如下公式并且下拉,如图所示:
=(TEXT(MOD(--TEXT(LEFT(A2,LEN(A2)-2)+IF(RIGHT(A2,2)="上午",0,0.5),"h"),12),"[>8]!0;[<6]!0;1")*0.3+1.2)*B2
公式还可以进一步简化:
=(TEXT(HOUR(LEFT(A2,LEN(A2)-2)),"[>8]!0;[<6]!0;1")*0.3+1.2)*B2
公式再简化一点:
=(TEXT(HOUR(LEFT(A2,LEN(A2)-2)),"[<=8,>=6]1;!0")*0.3+1.2)*B2
热心网友 时间:2023-10-22 22:26
=if(((a<8)*(a>6)+(a<20)*a(>18),b*1.5,b*1.2)热心网友 时间:2023-10-22 22:27
=if(or(and(a1>time(6,0,0),a1<time(8,0,0)),and(a1>time(18,0,0),a1<time(20,0,0))),b1*1.5,b1*1.2)热心网友 时间:2023-10-22 22:27
...................