should help you out I wish to count the number of dates in a given column. The column has three possible values for a cell. A cell can be blank, have an "x", or have a date. I don't care what the actual date is, I just want to count the number of cells that have a date in them. , Use COUNTIFS() code :
=COUNTIFS(A:A,">=" & DATE(1900,1,1),A:A,"<=" & DATE(2045,12,31))
=COUNTIFS(A:A,"<>",A:A,"<>x")
Share :

Using COUNTIF in VBA with last row
By : reVuL
Date : March 29 2020, 07:55 AM
this one helps. I'm quite new to excel and have been trying to get this Countif formula to work for a while now. I want it to count from the 12th row in column AN p till the last used row. I am very close now but when I run the macro it gives me a REF error. , Alternate: code :
Sub Date1()
Dim sDate As String
sDate = InputBox("Enter Date", "Date Entry", Format(Now, "m/d/yyyy"))
If Len(sDate) = 0 Then Exit Sub 'Pressed cancel
If Not IsDate(sDate) Then
MsgBox "[" & sDate & "] is not a valid date.", , "Exiting Macro"
Exit Sub
End If
Range("B15").Value2 = DateValue(sDate)
Range("B16").Formula = "=COUNTIF(AN12:AN" & Cells(Rows.Count, "AN").End(xlUp).Row & ",""<""&B15)"
End Sub

COUNTIF and AND
By : user2073997
Date : March 29 2020, 07:55 AM
I wish this help you Two simple ways to do this with what Excel 2003 offers you: array formulas or a helper column. code :
[Master]
Date Reason HelperColumn
20140101 A 0
20140201 B 0
20140301 A 1
20140401 A 1
20140501 B 0
20140601 A 0
[Results]
From: 20140201
To: 20140501
Reason: A
Count: 2
{=SUM(IF(Master!A2:A7>=B1,1,0)*IF(Master!A2:A7<=B2,1,0)*IF(Master!B2:B7=B3,1,0))}
=IF(AND(A2>=Results!$B$1;A2<=Results!$B$2;B2=Results!$B$3);1;0)
=SUM(Master!C2:C7)

Power Query  Add Column CountIF across two tables ie =COUNTIF(People[CityId],[@Id])
By : Marcus Vinicius Teix
Date : March 29 2020, 07:55 AM
will help you I would build a Query that starts from PEOPLE, and then Groups By City and calculates a Count. Then I would Merge the CITY query with that new Query and expand the Count column.

Excel: Countif of Countif
By : Dinesh
Date : March 29 2020, 07:55 AM
With these it helps I'd like to know if there's a way to calculate two countifs with different data and criteria in a single formula (not row by row or with pivot tables). Let the following example apply: , Try code :
=SUMPRODUCT((((U2:U11>5)+(V2:V11>5)+(W2:W11>5))>1)*1)
=SUMPRODUCT((((U2:U11>5)+(V2:V11>5)+(W2:W11>5))>1))
=SUM(IF(((U2:U11>5)+(V2:V11>5)+(W2:W11>5))>1, 1, 0))

How to use countif with or?
By : revathy
Date : March 29 2020, 07:55 AM
Hope this helps COUNTIF doesn't directly support OR in criterion argument. You could just use + or a complex arrayformula(not shown): code :
=COUNTIF(F7:F36,"no")+COUNTIF(F7:F36,"open")
=QUERY(F7:F10,"Select count(F) where F matches 'noopen'")
=QUERY(F7:F10,"Select count(F) where F ='no' or F='open'")

