Total sum per day in a graph - google-sheets

Let me excuse me for not finding the answer to my question. I've got no clue on what to look for.
I'm keeping a logbook with times. It contains information with how long I have worked. I need to make a graph that will show the amount of work I've done in total.
For example on day 1 I worked 1 hour and on day 2 I have worked 2 hours.
I fill the date in column A and the labour in column B. In my graph I need to see that I have worked 1 hour total on day 1, and I have worked 3 hours total on day 2 (basically I need to sum everything up)
I've tried fixing this myself by making a sum of the column in a new column, but this is just way too much work to do for the amount of rows I need.
I've did this for every cell in column E through row 14, until I decided to ask help from stack overflow

E1:
=SOM($D1:D1)
Auto Drag fill down.

Related

Google Sheets - Add Hours for All Instance of Names

I am rewriting a botched Google Sheet my wife uses for keeping track of kids who volunteer at her library. Each day, the kids select a Group from a drop-down, their name, and enter their time in and out. The main sheet calculates their total hours rounded as well as the total hours of the day and total number of kids who volunteered.
What she wants me to do now is list out all of the kids who are part of the volunteer program and calculate how many hours they volunteered this week. I'll end up getting a total hour count and etc, but for right now I need to figure out how to get all instances of "Kid A" and get the sum of their hours worked.
I was trying to use countifs but I am not sure that's the best function to use. Written as a formula, it'd be something like:
For-Each (name in C9:C74) Sum corresponding value in G9:74
So if Kid A worked 3 times, thus his name is listed 3 times, and his hour counts are 1.25, 2.5, and 0.75, next to his name I'd want it to return 4.5.
Example:
To make it even more simple, you can use SUMIFS...
=SUMIFS(G9:G74, C9:C74, "Kid A")
It's always easier to answer questions when you supply some representative data as part of the question, but 'blindly' based on your description you should be able to do the following to get the required answer:
=query(C9:G74,"select C,sum(G) group by C",0)

Sum of values generated by ARRAYFORMULA() is incorrect (Google Sheet)

I have a sheet used to calculate worked time. The aim is to sum up the hours and divide them in "regular" ones (up to 8h per day) and "overtime" ones (anything more than 8h per day). Each date has to have two rows(the second one is hidden by default), as there are multiple places I can work at, but the time calculated should be summed. Also, time worked on Saturday and Sunday should always be counted as overtime.
Screencap here.
The problem I have is with calculating overtime hours.
Regular hours are generated by:
=arrayformula(IFS(
WEEKDAY(A3:A70; 1)=1;0;
WEEKDAY(A3:A70; 1)=7;0;
E3:E70+E4:E70>8;8;
E3:E70+E4:E70<=8; E3:E70+E4:E70))
They are summed by =SUM(IFERROR(G3:G71;0)), which works just fine. Overtime hours are generated by:
=arrayformula(IFS(
WEEKDAY(A3:A70; 1)=1;E3:E70+E4:E70;
WEEKDAY(A3:A70; 1)=7;E3:E70+E4:E70;
E3:E70+E4:E70>8;E3:E70+E4:E70-8;
E3:E70+E4:E70<=8; 0))
And summed similarly by =SUM(IFERROR(H3:H71;0)) in H72. However, it returns a wrong value - in the sample sheet, it is 57 instead of 7
If I select the summed range, the tooltip shows the correct sum (7). If I add/remove the decimal place or change the formatting in H72, it suddenly changes to the correct one, too. However, when any new data is added (i.e. hours form a new day), it goes back to showing incorrect values.
It is not a simple display error, because the values are then imported by another sheet via =IMPORTRANGE and it imports those wrong values.
Any idea how to fix it?
Sample sheet here
try in H72:
=INDEX(SUM(IFERROR(1*H3:H71;0)))
update:
=INDEX(SUM(IFERROR(FILTER(1*H3:H71; MOD(ROW(H3:H71)-1; 2)=0); 0)))

Sum in ARRAYFORMULA based on possible cell values of two rows, then subtract another sum based on two different date values in two different columns

I really couldn't put the title into words very well. I will link a template spreadsheet below.
I've been working on a formula for hours now however I keep hitting dead ends. I'm unable to effectively do what I believe should be feasible. I'd give my attempts however I believe it would be of zero help, instead I'll explain my desired outcome.
I have a page with my employees, the E column isn't populated right now as I'd like to create a formula (ARRAYFORMULA so I don't have to paste a formula into each cell) to calculate the output based on a few conditions and values.
Vacation days are calculated as follows. The CEO gets 5, managers get 3 and assistants get 1. Extra vacation days based on points employees receive, 30 points or above is 5, 20 points or above is 3 and 10 or above point is 1.
Calculating the amount of vacation days employees have earned wasn't the hard part for me, it was having the formula subtract days based on how many vacation days have been used in the past 30 days.
We log vacations on the vacation page. The formula on the employees page needs to calculate how many vacation days each employee has used in the past 30 days only and subtract that from the total earned vacation days that employee has earned.
I'd like for the formula to use TODAY() to calculate 30 days in the past however for the sake of this example I'll use the date 06/09/2021 instead for continuity.
Sorry if I haven't explained this well or I'm asking too much in one go, I figured all the context is required.
Example sheet

Average of cell content based on day of month

I'm attempting to get an average number of calls/day based on yesterday's date.
My initial formula looks like this: =round(average(C24/3),2), where:
C24 = the total number of calls,
/3 = diving the contents of C24 by yesterday (assuming yesterday was the 3rd of the month),
,2 = rounding answer to 2 decimal places.
The formula itself works fine, but I have to go in daily to change the 'date' (/3, in my example).
Any suggestions as to how I can automate this formula so as to not have to go in to change the day of the month every day?
(for what it's worth, i tried using =round(average(C24/today()),2), but get a divide by zero error. Not sure what else to try. I also googled rolling averages/moving averages, but that didn't seem to help either.)
Use DAY and TODAY.
=DAY(TODAY()-1)
So
=ROUND(AVERAGE(C24/DAY(TODAY()-1)),2)

How can I get specific cells to increase by one hour each hour based off another cells start time

Here is a sample sheet of what I'm trying to accomplish
Basically, I am trying to get Column C to increase by one hour each hour based off of Column E start time. So if Mark starts at 6 when I check at noon it would show 6 hours for him etc.
https://docs.google.com/spreadsheets/d/16Mr3O0v_mCoEQhEBb1iPSayrE4yFlKevAdf-nXaZkKE/edit?usp=sharing
In your column C you can create a formula that references the current date time.
The formula I found in Google Docs is: HOUR(NOW()), which will pull the hour portion of the current datetime. The full formula would then be =HOUR(NOW())-E2 for the first cell in your worksheet.

Resources