I have a sheet in google spreadsheets with every business day in one calender week and the working hours of the staff. Now I am supposed to create a sheet displaying the salary of the employees for the month.
Sheet "Calender Week 01":
Person A
| Date | Working hours |
|---|---|
| 01.01.2022 | 8,0 |
| 02.01.2022 | 8,5 |
| 03.01.2022 | 8,0 |
| ... | ... |
Person B
| Date | Working hours |
|---|---|
| 01.01.2022 | 8,0 |
| 02.01.2022 | 8,5 |
| 03.01.2022 | 8,0 |
| ... | ... |
Sheet "Calender Week 02":
Person A
| Date | Working hours |
|---|---|
| 08.01.2022 | 8,0 |
| 09.01.2022 | 8,5 |
| 10.01.2022 | 8,0 |
| ... | ... |
Person B
| Date | Working hours |
|---|---|
| 08.01.2022 | 8,0 |
| 09.01.2022 | 8,5 |
| 10.01.2022 | 8,0 |
| ... | ... |
Now I'm supposed to create a sheet like this:
Sheet "Salary"
Person A
| Month | Salary |
|---|---|
| January 2022 | '=30*(working hours)' |
| Feburary 2022 | '=30*(working hours)' |
| March 2022 | '=30*(working hours)' |
| ... | ... |
Person B
| Month | Salary |
|---|---|
| January 2022 | '=30*(working hours)' |
| Feburary 2022 | '=30*(working hours)' |
| March 2022 | '=30*(working hours)' |
| ... | ... |
Since the working hours are noted for every calender week I can't just sum all the hours to calculate the whole month' salary, since some calender weeks contain days of the next/previous month. I couldn't think of any IF-formula either.I thought maybe it's possible to link the values of "working hours" to the "date" in the same row, so I could do something like "if the date is in month 01, add the number of working hours in the same row as the date value".
I hope someone can help me solve my problem!
Regards
Edit: I don't know why the tables aren't displayed correctly in my post. They are shown correctly in my post preview...