Count unique value with date range and 1 criteria - google-sheets

Can you please help me figure out the right formula for the below problem?
I want to count unique Item ID in Column A with a date range per agent.
You may find the link to the spreadsheet below:
https://docs.google.com/spreadsheets/d/1s-A3a-M5BlJI3xWNgeoL9ERKK056_0dsmSH7aae0TAY/
Thanks in advance for your help!
France

Based on your spreadsheet, you can nest a FILTER command inside of a COUNTUNIQUE function like so:
=COUNTUNIQUE(FILTER($A$2:$A,$B$2:$B=E2,$C$2:$C>=date(2018,3,1),$C$2:$C<=date(2018,3,8)))
You will have to enter the dates by hand, but the $B$2:$B=E2 will reference the Agent name from the E column in your spreadsheet. All of the references with a $ in google are absolute, and will not change as you move the function around within the sheet.

Option with QUERY for H2 and copied down to suit:
=count(query(A:C,"select count(A) where B='"&E2&"' and C>=date'2018-3-1' and C<=date'2018-3-8' group by A label count(A)''"))
Adjust the upper cutoff day to suit.

Related

Bring a range of holiday dates into workday arrayformula

I'm using WORKDAY in my sheet to find the next working day for an array of dates. Each date has a country variable which determines the list of holidays (stored elsewhere) passed to WORKDAY.
I have been able to use FILTER to achieve this, but only when I pass a single country name to it as a condition. Ideally, I want pass the whole range of country names to it so that I can use an ARRAYFORMULA. After I try that, I hit the mismatched range sizes error.
Here's a link to a sample workbook: https://docs.google.com/spreadsheets/d/1zQiOmPxOjpkV5g05vm-1ReI-9m_AltabQamXw2iUKrI/edit?usp=sharing
Any suggestions?
Yes its mismatched range sizes
On D2 Use This =ARRAYFORMULA(IF(C2:C="",,WORKDAY(A2:A,1,FILTER(K2:K,J2:J=A2:A)) ))
And on C2 Use this formula =IF(A2="",,WORKDAY(A2,1,FILTER($K$2:$K$8,$J$2:$J$8=B2))) and drag down to the bottom of the sheet.
And you will have this result

How to sum up the number of times a name is mentioned?

I'm trying to make a Google sheets document right now - It's basically a roster for work. How can I create a cell in which I can display the amounts of shifts one person has worked?
In other words: What is the function to count the number of times a specific name is mentioned in the sheet?
Thank you very much!!
let's say names are in A column try:
=QUERY(A:A; "select A,count(A) where A is not null group by A label count(A)''")

How to seach column for all text matches in column A and sum all of the corrosponding values in column B Excel

I'm sure this is possible, but I've been trying various ways for the past 2 hours and can't find the solution.
I need to find all the instances of a text name in column A, lookup all the numerical results in column B and sum them together.
I thought =ArrayFormula(sum(lookup(F2,$A$2:$B$1000))) would do the trick, but it's only picking up the last value on the last mention and not all the values of all the mentions.
I've attached a spreadsheet to show the data I'm looking at.
Thanks to the reference from BigBen to check out Sumifs. Using this command, the following works a treat:
=SUMIFS(B2:B3115,A2:A3115,F2)
try:
=QUERY(A2:B; "select A,sum(B) where A is not null group by A label sum(B)''")

Address lookup after filter

I have a Google form and a spreadsheet that is supposed to process it. The spreadsheet needs to filter the responses by date and get their respective data after that.
E.g. Consider:
With the columns being A and B and the rows being 1-4.
How do I filter it by month in ascending order followed by adding the amount next to it?
So it would look something like:
I understand how to filter by month in ascending order. It is done using =SORT(FILTER(A:A, MONTH(A:A)=1)) (for Jan). But how do you get the data next to it? I have tried =INDIRECT(ADDRESS(SORT(FILTER(A:A, MONTH(A:A)=1)), 2)) but there is no error and it is blank.
You can do SORT for whole A:B instead of doing only for A:A.
Eg:
SORT(FILTER(A:B, MONTH(A:A)=1),1,TRUE) for Jan
SORT(FILTER(A:B, MONTH(A:A)=2),1,TRUE) for Feb
Please refer link here and see whether this is what you expect.
try this:
=QUERY(A:B,"select month(A), A, sum(B) where not A is null group by month(A), A")
or this:
=QUERY(A:B,"select day(A), sum(B) where not A is null group by day(A) pivot month(A)")
or you could use your formula =SORT(FILTER(A:A, MONTH(A:A)=1)) twice and use custom date format for first column to label it as JAN, FEB...

=SUMIF Google Spreadsheet Help needed

I am new to spreadsheets and I need some help.
I created a sheet to register money to be reimbursed.
What I want to do is:
a) The total shows the total amount in Column 'C' but it will subtract the row value only if/when Column 'E' says yes.
b) The total should be on display all time in the merged cells on 'F'.
I was using this:
=SUMIF(E2:E9; "Yes"; B2:B9)
But I think am Way off.
Any kind of help is welcome.
Spreadsheet for reference: Link here
Does this formula work as you want:
=SUMIF(E:E;"No";C:C)

Resources