Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9786

Google sheets sum cells if corresponding date is in range of a month

$
0
0

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

DateWorking hours
01.01.20228,0
02.01.20228,5
03.01.20228,0
......

Person B

DateWorking hours
01.01.20228,0
02.01.20228,5
03.01.20228,0
......

Sheet "Calender Week 02":

Person A

DateWorking hours
08.01.20228,0
09.01.20228,5
10.01.20228,0
......

Person B

DateWorking hours
08.01.20228,0
09.01.20228,5
10.01.20228,0
......

Now I'm supposed to create a sheet like this:

Sheet "Salary"

Person A

MonthSalary
January 2022'=30*(working hours)'
Feburary 2022'=30*(working hours)'
March 2022'=30*(working hours)'
......

Person B

MonthSalary
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...


Viewing all articles
Browse latest Browse all 9786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>