I would like to create a formula to automatically add the total hours per labeled time block based on the text above it. For example, I would like the formula to add the value in F26 based on the text in E24. to Does anyone know if this is possible, and if so what formula should I use? Please help!
Excel Facts
What do {} around a formula in the formula bar mean?
For future reference, it's better to use one of the HTML tools (see my signature) to show your data. It's much easier for the helpers here to copy that onto their test spreadsheets than it is for them to actually have to retype everything. I normally wouldn't do it either, but I had some free time.
See if this works for you:
Excel 2012
B
C
D
E
F
G
H
I
J
K
L
24
7-L
7-L
KAS
KAS
25
Time In
Total
8:00 AM
Total
7:40 AM
Total
8:00 AM
Total
8:00 AM
Total
26
Time Out
0:00
10:00 AM
2:00
9:30 AM
1:50
1:00 PM
5:00
12:00 PM
4:00
27
KAS
KAS
KAS
7-L
28
Time In
Total
10:00 AM
Total
9:30 AM
Total
2:00 PM
Total
1:00 PM
Total
29
Time Out
0:00
12:00 PM
2:00
12:00 PM
2:30
3:30 PM
1:30
3:30 PM
2:30
30
7-L
7-L
7-L
KAS
31
Time In
Total
1:00 PM
Total
1:00 PM
Total
3:30 PM
Total
3:30 PM
Total
32
Time Out
0:00
2:00 PM
1:00
2:00 PM
1:00
5:00 PM
1:30
5:00 PM
1:30
33
KAS
KAS
34
Time In
Total
2:00 PM
Total
2:00 PM
Total
Total
Total
35
Time Out
0:00
5:00 PM
3:00
4:40 PM
2:40
0:00
0:00
36
Total
37
KAS
7-L
38
22:10
9:50
<tbody>
</tbody>
Sheet8
Worksheet Formulas
Cell
Formula
D38
=SUMIF($E$24:$K$34,D37,$F$26:$L$36)
F38
=SUMIF($E$24:$K$34,F37,$F$26:$L$36)
<tbody>
</tbody>
<tbody>
</tbody>
Also, note that merged cells can be really bad. Formulas often don't play nice with them. Using "Center across selection" is often better.
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.