Countif and look up in two sheets - google-sheets

I am trying to use a variation of a countif formula across two sheets. I want to count the number of times an agent of mine is a "Yes" in column A based on how many times their name appears in column A. BUt I want to pull this information from one google sheet to a completely different sheet in another doc.
COUNTIF paired with IMPORTRANGE
It should be giving me a count of 3, but I am getting 0.

first you need to run your IMPORTRANGE formula alone and Allow access. then when sheets are connected you just do:
=COUNTIF(IMPORTRANGE("ID-or-URL", "Sheet1!A1:A"), "yes")

Related

Taking names from Multiple Sheets and having a function Count the number of times the name appears on the different sheets

Practically I have around 10 different sheets with names on these sheets in column A. I would like to in a separate sheet have the name and the number of times the name is found in the 10 other sheets. For example, the name Tom is posted three times in sheet-1, four times in sheet-2 and one time in sheet-3. I would like in a new sheet to be able to type "Tom" into column A and then in column B next to Tom show the number of times it was found in the multiple sheets. This needs to be a function that I can put a new name into column A and then it searches for the number of times it is found in the 10 different sheets.
I have done something similar but think I must be formatting wrong for multiple sheets. The function I'm using is =COUNTIF(Sheet1!A2:A,Sheet2!A2:A) this works for comparing just the 2 sheets and will show a correct number but when I try formatting for multiple sheets it will not work. enter image description here this is kind of a what the solution would be like except of course in different sheets. Also note that when adding a new name to the "master list" it should try to find the name. Sheets 1,2, and 3 will be updated automatically so manually I would write the name in the master, and it then gives me the number of times the newly added name appears.
You could try the following in your master sheet to get a list of all names present in all sheets against their count:
=query({Sheet1!A2:A;Sheet2!A2:A;...;SheetN!A2:A},"select Col1,count(Col1) where Col1 is not null group by Col1",0)
N.B. we are using an array literal (curly brackets & semicolons) to union the vertical ranges from each source sheet into one long vertical range to then feed into the QUERY function. If any of the source sheets changes then the master sheet will automatically update.

How can I count the number of items listed on a different google sheet based on dates in 2 different cells and if another cell is blank?

I have a google doc that tracks information about employee training (Example 1). I have another google doc that needs to summarize the information (Example 2) from multiple different sheets which mirror example 1 but for different teams.
Example 1: this sheet is tracking employees start dates, dates they finish training, and if they have quit. (there are multiple different docs all with the same format that I'm pulling from using importrange).
I need a formula that will count the number of employees currently in training. So count if start date is equal to or after today, end date is equal to or less than today, and the quit column is blank.
If the formula worked the way it should, and I was looking at the summary doc on 11/10/2021, it should report 4 people in the "# in Training" column on the table below (Example 2).
I have tried using an ArrayFormula with CountIfs to accomplish this, but it still pulls 0. Here is the formula I've been playing with:
=ArrayFormula(COUNTIFS('tracker'!$B$2:$B, "<="&TODAY(), 'tracker'!$C$2:$C, ">="&TODAY(), 'tracker'!$D$2:$D,""))
Give a try on below formula-
=COUNTIFS(B2:B8,"<=" & DATE(2021,11,10),C2:C8,">=" & DATE(2021,11,10),D2:D8,"")

I need a Google Formula that counts cells that meet two conditions in a range

I have a spreadsheet that I am running reports on. I need to count some data within the B column. The data is within the same column on the same sheet tab.
This formula below looks in the B column and counts C.
=COUNTIF('Google Sheet Tab1'!B1:B1071,"C")
This didn't work either
=COUNTIFS(Google Sheet Tab1!B1:B1071,"C",Google Sheet Tab1!B1:B1071,"N")
I need a formula that looks for C and N and adds them together and displays them.
The easiest way would be to add both conditions.
Please try
=COUNTIF('Google Sheet Tab1'!B1:B1071,"C")+COUNTIF('Google Sheet Tab1'!B1:B1071,"N")
COUNTIFS would need to satisfy both conditions at the same time.
Read more about it.

True/false check across multiple google sheets with 2 criteria

So I've been trying to find a way to check multiple sheets on a column on the master sheet.
Previously the different sheets used a mixture of importrange and index/match to match town(each sheet is a different one)/number and pull a separate, matching columns number into said sheet.
=IF(B9>0,IFNA(INDEX(IMPORTRANGE("MAINSHEETLINK","Civils!$J$5:$J$500"), MATCH (B9,(IMPORTRANGE("MAINSHEETLINK","Civils!$I$5:$I$500"))*(IMPORTRANGE("MAINSHEETLINK","Civils!$D$5:$D$500")=$P$7), 0)),0),"0")
the $P$7 is the town name on the row it searches for.
The ifna just keeps it clean.
I can't figure out how I can use vlookup or query to search multiple sheets in this way. There's a separate Yes/No check on the secondary sheets that checks whether or not something was imported. I'd like a separate column on the main sheet to check across multiple sheets to true/false if the above check is Yes/No.
There's a possibility I have several nested if functions working through each sheet using the above index/match, but that seems prone to breaking, not to mention having to redo it once new sheets crop up.

Compare data google sheets

I am using google sheets and I want to compare the quantity of interactions o a given person in a period of time.
My problem is that between one week and another, the people can change, some people can have no interactions and is not reported and I can have new people.
So I need a formula that allow me to compare the previous period of time but also the name.
I am trying this in order to follow up how the people's behavior is changing.
This is the example spreadsheet.
Thanks
This is an easy, quick-and-dirty solution using vlookup.
There are two variations. One using a single criteria and one using multiple criteria. infoinspired.com has a good article on How to Use VLOOKUP with Multiple Criteria in Google Sheets.
Single Criteria: This is the formula.
=iferror(vlookup((B2+1)&C2,$A$2:$D$9,4,false),"error")
This involves a cheat by creating a new column A which contains the concatenation of the date and name values for each row. This is a unique value.
The lookup criteria is the (date (B2) plus 1=the next day) and the name.
The lookup range is self-explanatory and the value returned is the Quantity (from column 4).
The vlookup formula is inside an iferror() so that any problems are highlighted.
Multiple Criteria: This uses an array formula.
=ArrayFormula(iferror(vlookup((B2+1)&C2, {B2:B&C2:C, D2:D}, 2, 0 ), "error"))
The vlookup component is very similar to the "simple" formula. The difference is that each criteria 1:(Date plus 1) and 2:Name are recognised separately, and assigned discrete lookup columns (B and C respectively).
Again, the whole thing is wrapped in an iferror statement to highlight any problems.
This spreadsheet shows the workings:

Resources