LoveByPDF logo

LoveByPDF

EN

Conditions · COUNTIF, COUNTIFS

COUNTIF in Excel - count cells that match (attendance P / A / L)

COUNTIF counts the cells in a range that match a value or condition. Great for attendance sheets.

=COUNTIF(range, criteria)
Write it for my sheet

Examples

Type this in the Formula StudioFormula
“count P in C4:AG4”=COUNTIF(C4:AG4,"P")
“count D2:D9 where D > 50000”=COUNTIFS(D2:D9,">50000")
“count P and L in C4:AG4”=COUNTIF(C4:AG4,"P")+COUNTIF(C4:AG4,"L")

People also search for

  • countif formula in excel
  • countifs formula in excel
  • countif formula for attendance
  • countif with multiple criteria
  • count p in excel attendance
  • countif greater than
  • countif not blank
  • countifs with date range
  • countif formula in excel in hindi
  • count if cell contains text

FAQ

How do I count P and L together in an attendance row?

Add two COUNTIFs: =COUNTIF(C4:AG4,"P")+COUNTIF(C4:AG4,"L"). Or use =SUM(COUNTIF(C4:AG4,{"P","L"})).

How do I count cells that contain a word?

Use a wildcard: =COUNTIF(A2:A99,"*delhi*") counts cells containing 'delhi' anywhere. COUNTIF is not case-sensitive.

Can LoveByPDF write this formula for me?

Yes. Open your Excel file in the Excel Agent's Formula Studio, click a cell and type what you need - e.g. "count P in C4:AG4" - you get the formula, a preview on your sheet and an explanation, then insert it.

Related formulas