JoshLyman
New Member
- Joined
- Jan 11, 2023
- Messages
- 35
- Office Version
- 365
- 2010
- Platform
- Windows
Struggling to figure out what formula to use. I have the below table where users will enter a line, say how many hours they've worked that day, and stipulate which 'KSBs' they've done. For instance on 01/08/2023, they spent 4 hours working on K1 and K2.
I have a second table which should tell me how many times a given KSB has been recorded, as well as how many hours they've spent working on each one. The first formula is working, but the second isn't. For some reason I cannot get it to calculate the 'hours' column every time a KSB appears in a row. For instance K1 appears twice and should say 7 hours (4 on 01/08/2023 and 3 on 01/09/2023).
Any advice will be greatly received!
Book1 | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Date | Hours | KSB covered | KSB covered2 | KSB covered3 | ||
2 | 01/08/2023 | 4 | K1 | K2 | |||
3 | 15/08/2023 | 6 | K3 | ||||
4 | 01/09/2023 | 3 | S2 | K1 | |||
5 | 04/09/2023 | 7 | S2 | B1 | B2 | ||
6 | 18/09/2023 | 5 | K3 | S3 | |||
Sheet1 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
C2:E6 | List | =$H$2:$H$10 |
I have a second table which should tell me how many times a given KSB has been recorded, as well as how many hours they've spent working on each one. The first formula is working, but the second isn't. For some reason I cannot get it to calculate the 'hours' column every time a KSB appears in a row. For instance K1 appears twice and should say 7 hours (4 on 01/08/2023 and 3 on 01/09/2023).
Cell Formulas | ||
---|---|---|
Range | Formula | |
I2:I10 | I2 | =COUNTIF(Table1[[KSB covered]:[KSB covered3]],[@KSB]) |
J2:J10 | J2 | =SUMIF(Table1[[KSB covered]:[KSB covered3]],[@KSB],Table1[Hours]) |
Any advice will be greatly received!