Here are a variety of Microsoft Excel COUNT COUNTIF and COUNTIFS functions with examples for various scenarios.
COUNTIF
In its most basic form this COUNTIF formula will simply give a total count of cells A2 to A112 if they have anything at all in them:
=COUNTIF(A2:A112,"*")
COUNTIFS
The COUNTIFS function allows you to get a total count based on certain criteria. The syntax is:
=COUNTIFS (range1, criteria1, [range2], [criteria2], …)
For example the below gives me a total count if there is:
1. Anything in Column A
2. Column D does not contain the word ‘True’
3. The dates in column C are all after 07/12/2015
The name of the worksheet is ‘Userlogontimes’
=COUNTIFS('Userlogontimes'!A:A,"*",'Userlogontimes'!D:D,"<>True",'Userlogontimes'!C:C,">07/12/2015")
The below command here will give me a total count if:
1. There is anything in column C
2. Column A does not equal the term ‘SharedMailbox’
The name of the worksheet is ‘Exchange’
=COUNTIFS(Exchange!C:C,"*",Exchange!A:A,"<>SharedMailbox")