How can I count with two criteria in google spreadsheet? - google-sheets

I am quite confused on how this function...
I am trying to count date and activity but inorder to count activity, it should be not blank and it follows the corresponding date. How can I code it? Tried countifs but I can't make it work.
Thanks in advance
https://docs.google.com/spreadsheets/d/1XfAp1RKp55jDRj7jSTIPGQSvy1GHH8KE-VR-vJmCF3w/edit?usp=drivesdk

your formula should be:
=COUNTIFS(A$2:A, D2, B$2:B, "<>")

Related

Google Sheet - Sort - Missing data and not working as expected

I have a very simple request, I just want to sort my sheet by 3 columns : Date, Type and Course.
I have some missing row when performing the formula on one day. I also have a problem to sort by date and the other columns. It is not sorting. I try to convert to plain text and others solutions as =SORT(ARCHIVAGE!B7:J;ARCHIVAGE!B7:B;true;ARCHIVAGE!D7:D;true;ARCHIVAGE!E7:E;true)
=SORT(ARCHIVAGE!B7:J;1;true;3;4;true) but no success at all.
Here is a sample of the file a few days
Thnaks for your help on this.
j.
This formula is in cell A1 of a new tab called MK_Idea:
=QUERY(ARCHIVAGE!B:G;"where D<>'' order by B,D,F")
read about query() here.

How to calculate months with arrayformula in google script

I am able to calculate the monthly difference using dateif but not arrayformula
Example : Start Date: 5-Oct-2020
End date: 9-Jun-2021 month difference: using formula (DATEDIF(D3,E3 , "M")).
But I'm unable to use array formula to calculate as I wanted each row to be auto-calculated with dates.
Appreciate some help from Google experts!
Try
=ArrayFormula(IF(LEN(D3:D), DATEDIF(D3:D,E3:E, "M"),))
and see if that works?
References
Arrayformula()
How do arrayformulas work?

How can I search a column with alphanumeric entries and return a 1 for unique with an array formula?

I need something that auto-fills for however many rows are in the spreadsheet, but I'm not sure if an array is the best way.
In my example below, I want Column C to show a 1 if the corresponding entry in Column A is unique, and a 0 if it isn't.
I had hoped it would be as easy as using ARRAYFORMULA(IF(UNIQUE(A1:A),1,0)), but forgot that IF wouldn't work with the text.
Here's my example with the most recent formula I tried.
Thank you!
Please use the following formula:
=ArrayFormula(IF(LEN(A1:A)<>0,
IF(COUNTIF(A1:A,A1:A)>1,0,1)
,""))
Functions used:
COUNTIF
ArrayFormula
LEN
You can combine ARRAYFORMULA and IF with IFERROR and COUNTIF
Sample:
=ARRAYFORMULA(IF(IFERROR(COUNTIF(A1:A,A1:A)=1,0)=TRUE,1,0))

Google Spreadsheet, use array formula with filter betwen date

Hy everyone,
I try a simple trick, Use an array formula with a countblank with a filter between date. Without array, its work great, with an array, it goes crazy. why?
I use a spreadsheet to follow the present or absent off people by month. (exemple sheet)
I try to like this by line and its work fine:
=COUNTBLANK(FILTER(D9:AU9,D8:AU8>=B4,D8:AU8<=B5))
When i try to apply this to every line, its goes crazy :
=ARRAYFORMULA(IF(A8:A19<>"",COUNTBLANK(FILTER(D8:AU,D8:AU8>=B4,D8:AU8<=B5)),""))
Where is my mistake?
In C8 try this formula
={""; Arrayformula( if(len(A9:A), countif(if((D9:AU="")*(month($D$8:$8)=month($B$3)), row(A9:A)), row(A9:A)),))}
and see if that works?

=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