TessieBear99
New Member
- Joined
- Aug 26, 2018
- Messages
- 20
- Office Version
- 365
- Platform
- Windows
I don't even know if this is possible, it was hard enough figuring out the title for this post.
So to give context to my problem, I'm given a sheet from our payroll team of all the leave taken in the previous month for each of our locations within the business, and I need to add up the total days of leave allocated to each location.
I found this article Excel Formula - Find a particular occurrence which provides a formula I can use to get the different occurrences of "Days" and give me the number next to it, however I have no idea how to do that based off the location.
Below is my spreadsheet, highlighted in yellow are the locations, orange are the occurrences of "Days", and green are the numbers I need counted. I've made a list of all the locations we have (column K) and an empty column next to that (column L) to put the formula in, so that, for example, I could find 0482 in that list and next to it would show 10.
So for location 0108, I need to look up K6 in B:B, then find "Days" in column H of that block and then return the value in the adjacent cell in column G.
If anyone can help at all it would be greatly appreciated, thank you!
So to give context to my problem, I'm given a sheet from our payroll team of all the leave taken in the previous month for each of our locations within the business, and I need to add up the total days of leave allocated to each location.
I found this article Excel Formula - Find a particular occurrence which provides a formula I can use to get the different occurrences of "Days" and give me the number next to it, however I have no idea how to do that based off the location.
Below is my spreadsheet, highlighted in yellow are the locations, orange are the occurrences of "Days", and green are the numbers I need counted. I've made a list of all the locations we have (column K) and an empty column next to that (column L) to put the formula in, so that, for example, I could find 0482 in that list and next to it would show 10.
So for location 0108, I need to look up K6 in B:B, then find "Days" in column H of that block and then return the value in the adjacent cell in column G.
Employee History Report.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | Location | 0482 | Location | Days | ||||||||||
2 | ##### | ##### | 0101 | |||||||||||
3 | Other Leave | Leave | 40.00 | Normal | 0102 | |||||||||
4 | Other Leave | Leave | 40.00 | Normal | 0103 | |||||||||
5 | 80.00 | 0105 | ||||||||||||
6 | 10.00 | Days | 0108 | |||||||||||
7 | Location | 0108 | 0109 | |||||||||||
8 | ##### | ##### | 0121 | |||||||||||
9 | Other Leave | Leave | 2.00 | Normal | 0125 | |||||||||
10 | Other Leave | Leave | 22.00 | Normal | 0169 | |||||||||
11 | Other Leave | Leave | 15.75 | Normal | 0171 | |||||||||
12 | 39.75 | 0174 | ||||||||||||
13 | 4.00 | Days | 0175 | |||||||||||
14 | Location | 0181 | 0176 | |||||||||||
15 | ##### | ##### | 0180 | |||||||||||
16 | Other Leave | Leave | 1.00 | Normal | 0181 | |||||||||
17 | Other Leave | Leave | 1.00 | Normal | 0182 | |||||||||
18 | Other Leave | Leave | 1.50 | Normal | 0183 | |||||||||
19 | 3.50 | 0184 | ||||||||||||
20 | 0.00 | Days | 0185 | |||||||||||
21 | Location | 0182 | 0186 | |||||||||||
22 | ##### | ##### | 0187 | |||||||||||
23 | Other Leave | Leave | 28.00 | Normal | 0192 | |||||||||
24 | 28.00 | 0200 | ||||||||||||
25 | 3.00 | Days | 0300 | |||||||||||
26 | Location | 0186 | 0335 | |||||||||||
27 | ##### | ##### | 0336 | |||||||||||
28 | Other Leave | Leave | 4.50 | Normal | 0345 | |||||||||
29 | 4.50 | 0346 | ||||||||||||
30 | 0.00 | Days | 0348 | |||||||||||
31 | Location | 0369 | 0349 | |||||||||||
32 | ##### | ##### | 0353 | |||||||||||
33 | Other Leave | Leave | 45.00 | Normal | 0351 | |||||||||
34 | Other Leave | Leave | 45.00 | Normal | 0360 | |||||||||
35 | 90.00 | 0361 | ||||||||||||
36 | 10.00 | Days | 0363 | |||||||||||
37 | Location | 0372 | 0364 | |||||||||||
38 | ##### | ##### | 0365 | |||||||||||
39 | Other Leave | Leave | 80.00 | Normal | 0366 | |||||||||
40 | 80.00 | 0367 | ||||||||||||
41 | 10.00 | Days | 0368 | |||||||||||
42 | Location | 0461 | 0369 | |||||||||||
43 | ##### | ##### | 0461 | |||||||||||
44 | Other Leave | Leave | 8.00 | Normal | 0480 | |||||||||
45 | Other Leave | Leave | 8.00 | Normal | 0481 | |||||||||
46 | Other Leave | Leave | 8.00 | Normal | 0482 | |||||||||
47 | Other Leave | Leave | 8.00 | Normal | 0483 | |||||||||
48 | Other Leave | Leave | 8.00 | Normal | 0484 | |||||||||
49 | Other Leave | Leave | 8.00 | Normal | 0600 | |||||||||
50 | Other Leave | Leave | 8.00 | Normal | 0623 | |||||||||
51 | Other Leave | Leave | 8.00 | Normal | 0775 | |||||||||
52 | ##### | ##### | 0776 | |||||||||||
53 | Other Leave | Leave | 3.50 | Normal | 0777 | |||||||||
54 | Other Leave | Leave | 2.00 | Normal | 0778 | |||||||||
55 | Other Leave | Leave | 10.00 | Normal | 0779 | |||||||||
56 | Other Leave | Leave | 2.00 | Normal | 0888 | |||||||||
57 | Other Leave | Leave | 10.00 | Normal | ||||||||||
58 | Other Leave | Leave | 2.00 | Normal | ||||||||||
59 | Other Leave | Leave | 2.00 | Normal | ||||||||||
60 | Other Leave | Leave | 3.50 | Normal | ||||||||||
61 | Other Leave | Leave | 2.00 | Normal | ||||||||||
62 | Other Leave | Leave | 3.00 | Normal | ||||||||||
63 | Other Leave | Leave | 2.00 | Normal | ||||||||||
64 | Other Leave | Leave | 2.00 | Normal | ||||||||||
65 | ##### | ##### | ||||||||||||
66 | Other Leave | Leave | 8.00 | Normal | ||||||||||
67 | ##### | ##### | ||||||||||||
68 | Other Leave | Leave | 7.00 | Normal | ||||||||||
69 | Other Leave | Leave | 6.50 | Normal | ||||||||||
70 | Other Leave | Leave | 40.00 | Normal | ||||||||||
71 | Other Leave | Leave | 8.00 | Normal | ||||||||||
72 | Other Leave | Leave | 7.00 | Normal | ||||||||||
73 | Other Leave | Leave | 40.00 | Normal | ||||||||||
74 | Other Leave | Leave | 6.50 | Normal | ||||||||||
75 | Other Leave | Leave | 7.00 | Normal | ||||||||||
76 | Other Leave | Leave | 6.25 | Normal | ||||||||||
77 | Other Leave | Leave | 7.00 | Normal | ||||||||||
78 | Other Leave | Leave | 6.00 | Normal | ||||||||||
79 | Other Leave | Leave | 6.75 | Normal | ||||||||||
80 | Other Leave | Leave | 6.50 | Normal | ||||||||||
81 | 270.50 | |||||||||||||
82 | 33.00 | Days | ||||||||||||
Report |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G5 | G5 | =+G4+G3 |
G6,G82,G41,G30,G25,G20,G13 | G6 | =+ROUNDDOWN(G5/8,0) |
G12,G19 | G12 | =SUM(G9:G11) |
G24,G40,G29 | G24 | =SUM(G23) |
G35 | G35 | =SUM(G33:G34) |
G36 | G36 | =+ROUNDDOWN(G35/9,0) |
G81 | G81 | =SUM(G44:G80) |
If anyone can help at all it would be greatly appreciated, thank you!