Complicated function Google Sheets: Vacation tracker - google-sheets

I am working in this sample spreadsheet
My first issue: On the sheet New Summary of Leave I would like it to only add Leave Type Vacation and leave out all types Sick. How can I include this condition? Is there any simpler formula I should use?

Try below formula. Add another condition and give criteria Vacation.
=IF(A5<>"",sumifs('Leave responses'!H:H,'Leave responses'!D:D,">="&$E$2,'Leave responses'!D:D,"<="&$G$2,'Leave responses'!D:D,"<=" &now(), 'Leave responses'!C:C,A5,'Leave responses'!F:F,"Vacation"),"")

Related

IF statement with Vlookup based on condition

I am currently refining my Google sheet for orders our company receives, but would like some help in creating a condition to an VLOOKUP formula.
To keep the sheet clean, text only appears on input of L column.
We have a second sheet with a simple costing.
This is the formula;
=IF(CONCATENATE(L371)="","",VLOOKUP(L371,COSTING!F:G,2,false))
However, this works for only one supplier at the moment.
Is there a way of adding a condition to take into account a second cell on the main sheet?
Example;
Adding this into the VLOOKUP ...
If X371 = 'SUPPLIER NAME1' look here (L371,COSTING!F:G,2,false), If X371 = 'SUPPLIER NAME2' look here (L371,COSTING!M:N,2,false)
Still learning formulas, so haven't quite mastered how to combine statements.
Any suggestions?
Try
=IF(L371="","",if(X371="SUPPLIER NAME1",vlookup(L371,COSTING!F:G,2,false),If(X371="SUPPLIER NAME2",VLOOKUP(L371,COSTING!F:G,2,false))))

Google sheets formula to add order quantities over several sheets

here is a link to my google sheet for reference: [https://docs.google.com/spreadsheets/d/1tUlqB2tsH4xEsxYiMv1CiUIY3hhLGpM-1G8eWOyZPWk/edit?usp=sharing]
What I am trying to do is in the "Clients" sheet there is the column "Orders". Here I want a count of all the times that "Client ID" has been used across all the other pages. Any tips on what formula to use? Thanks
I would use:
={"Orders";ArrayFormula(IF(A2:A="","",COUNTIF({Jun!B:B;July!B:B;August!B:B;Sept!B:B}, A2:A)))}
from what i saw you only needed to add the ARRAYFORMULA to your formula, it should end up like this: =ArrayFormula(COUNTIF({Jun!B:B;July!B:B;August!B:B;Sept!B:B},A2)).
But, even after adding it, to me at least, the results didn't change. Could you verify and make sure there's a problem with the results the SUMIFS is giving you?
If you find anything that's broken I'll try and help.

How to combine data from multiple Google Sheets and organize/filter it?

Here's my sample spreadsheet: https://docs.google.com/spreadsheets/d/1c-nXosPZvnEplFME6GHXlxuQUrVe4ImF5c5Go9_75DU/edit#gid=34769607
I use an API to import data from our time tracking app into Google Sheets. The "Project Details" sheet has most of the info about the projects, except for the hours spent on each project. So I have a "Project Hours" sheet that has the hours spent.
I want to combine these two things into one list in a separate "Main" sheet, as well as leave out columns that I don't care about. I really only care about the project name, the client name, the start date, end date, and total hours.
There must be a simple formula to use that gives me a clean list of all the projects and only shows me the data I care about, like QUERY or ARRAYFORMULA, but I'm not very familiar with those. Any help would be appreciated!
Craig. Yes, a QUERY with a VLOOKUP can accomplish this. I added a new tab (clearly marked as mine) to your example sheet. Being thorough, I wanted to include the column header in the last column as well, which makes the formula a bit longer than it would otherwise be in that it uses the IFERROR wrap on the VLOOKUP to assign the header for Row 1 (or otherwise leaves the last column blank if no match is found for a project name).
Here's the formula I used (though other approaches could certainly have been used as well):
=ArrayFormula({QUERY('Project Details'!A:Y,"Select B, Y, P, Q Where A Is Not Null"),IFERROR(VLOOKUP(QUERY('Project Details'!A:A,"Select * Where A Is Not Null"),'Project Hours'!A:E,5,FALSE),IF(ROW('Project Details'!A:A)=1,'Project Hours'!E$1,""))})

Provide a summary sheet based on data from other sheet in same workbook

I am creating a sheet where I am tracking the working hours of some employees in google sheets.
Each month I need to provide a summary per employee to sign. Until now I was doing it by hand, but there must be some better way to do it.
A test sheet can be found here, the first sheet is data, the second sheet is the summary I am looking for.
https://docs.google.com/spreadsheets/d/1LmJYMqJTEpjSKNY4qFXhLRaBbotj7lUEHauynzHISwg/edit?usp=sharing
Is there any way to use an array formula with some filters for Employee name and a date range to accomplish this?

Google sheets sum if within specific week

I have a Google Sheets budget and I am trying to write something to keep track of how much money I have spent in a specific week.
Link to my example budget below.
https://docs.google.com/spreadsheets/d/15HP24iDd-kZ-MydKwgbMCoG0rCHN_DNOcBZsm0HhKQ0/edit?usp=sharing
I am already using sumif() to say, if the entry's CATEGORY says "Gas" then add theAMOUNT to the Gas row in the table. I want to add another parameter that will sum the amounts if the entry's CATEGORY says Gas AND is within the specified week above the table...(WEEK 31).
I hope this makes sense if you need more clarification I will try my best to do so.
As Diego suggested, SUMIFS()should work. Example
=sumifs($C$4:$C$9, $D$4:$D$9, "=week "&$I$3, $B$4:$B$9,$F4)
An alternative would be to use sumproduct().
=sumproduct($D$4:$D$9="week "&$I$3, $B$4:$B$9=$F4, $C$4:$C$9)
You should be able to fill down this formula (as far as needed) for the other categories.

Resources