View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default CountIf Functions

"Don Guillett" wrote...
try this, changing columns to suit
=SUMPRODUCT((F2:F12=1100)*(LEN(TRIM(G2:G12))0) )

....

Doesn't actually check for dates, just for either nonwhitespace text
or numbers in the second column range.

If the OP really means blank, then it'd be better to use either

=SUMPRODUCT((F2:F12=1100)*ISNUMBER(G2:G12))

or (more exacting by ensuring the number is a valid 1900-basis date
serial number)

=SUMPRODUCT((F2:F12=1100)*(G2:G12=--"1990-01-01")*
(G2:G12<=--"9999-12-31"))

But the OP's follow-up leads me to suspect the OP has a mixture of
text and numbers in the first column range, so more robust to use

=SUMPRODUCT((--F2:F12=1100)*(G2:G12=--"1990-01-01")*
(G2:G12<=--"9999-12-31"))