julievandermeulen
Board Regular
- Joined
- Jan 25, 2020
- Messages
- 107
- Office Version
- 365
- Platform
- Windows
=SUM($D$2:$D$6)-COUNTIF($A$2:$A$5,"x")*0.5
=SUM(D2:D6)-0.5*SUMPRODUCT(1*(A2:A5="x"))
Try
Excel Formula:=IF(COUNTIF(A2:A5,"x"),SUM(D2:D5)-0.5,SUM(D2:D5))
but can there be more than 1 "x"
Awesome. Is there a way to calculate it by row and the information in column f.Try
Excel Formula:=IF(COUNTIF(A2:A5,"x"),SUM(D2:D5)-0.5,SUM(D2:D5))
but can there be more than 1 "x"
=SUM(C2-B2)*24-(A2="x")*(F2="s")*0.5
Calender formation for Excel 365 version.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | lunch | time in | time out | total time | |||||
2 | 08:00 | 09:00 | 1 | s | |||||
3 | x | 09:00 | 11:00 | 2 | s | ||||
4 | 11:00 | 11:30 | 0.5 | r | |||||
5 | 11:30 | 12:00 | 0.5 | b | |||||
6 | Total | ||||||||
7 | r | 0.5 | |||||||
8 | s | 2.5 | |||||||
9 | b | 0.5 | |||||||
10 | grand total | 3.5 | |||||||
11 | |||||||||
Sheet4 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D7:D9 | D7 | =SUMPRODUCT(($F$2:$F$5=$C7)*((($C$2:$C$5-$B$2:$B$5)*24)-(($A$2:$A$5="x")*0.5))) |
=SUMPRODUCT(($F$2:$F$5=$C7)*((($C$2:$C$5-$B$2:$B$5)*24)-(($A$2:$A$5="x")*0.5)))
Awesome! Thanks so much!!
Calender formation for Excel 365 version.xlsx
A B C D E F G 1 lunch time in time out total time 2 08:00 09:00 1 s 3 x 09:00 11:00 2 s 4 11:00 11:30 0.5 r 5 11:30 12:00 0.5 b 6 Total 7 r 0.5 8 s 2.5 9 b 0.5 10 grand total 3.5 11 Sheet4
Cell Formulas Range Formula D7:D9 D7 =SUMPRODUCT(($F$2:$F$5=$C7)*((($C$2:$C$5-$B$2:$B$5)*24)-(($A$2:$A$5="x")*0.5)))
In D7 copied down.
Excel Formula:=SUMPRODUCT(($F$2:$F$5=$C7)*((($C$2:$C$5-$B$2:$B$5)*24)-(($A$2:$A$5="x")*0.5)))
25 03 29.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | lunch | time in | time out | total time | ||||
2 | 08:00 | 09:00 | 1 | s | ||||
3 | x | 09:00 | 11:00 | 2 | s | |||
4 | 11:00 | 11:30 | 0.5 | r | ||||
5 | 11:30 | 12:00 | 0.5 | b | ||||
6 | Total | |||||||
7 | r | 0.5 | ||||||
8 | s | 2.5 | ||||||
9 | b | 0.5 | ||||||
10 | grand total | 3.5 | ||||||
Sheet3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D7:D10 | D7 | =LET(v,BYROW(C7:C9,LAMBDA(rw,SUM((F2:F5=rw)*((C2:C5-B2:B5)*24-(A2:A5="x")*0.5)))),VSTACK(v,SUM(v))) |
Dynamic array formulas. |