PDA

View Full Version : Solved: Sumproduct and Countif error if there is a blank cell



RobertBC
01-18-2013, 11:26 AM
Good Day!
i am trying to generate a SUMPRODUCT nested COUNTIF function to come up the total number of plate number, the problem is when a cell is empty or blank the index error display #DIV/0!

EXAMPLE FORMULA
=SUMPRODUCT(1/COUNTIF(C12:C33,C12:C33))

=SUMPRODUCT(1/COUNTIF(C12:C33,C12:C33))-IF(COUNTIF(C12:C33,"--"),1,0)

NOTE: cell C12:C33 is a list of plate numbers

Bob Phillips
01-18-2013, 11:43 AM
Try

=SUMPRODUCT((C12:C33<>"")/COUNTIF(C12:C33,C12:C33&""))

RobertBC
01-18-2013, 12:02 PM
tRY

=SUMPRODUCT((C12:C33<>"")/COUNTIF(C12:C33,C12:C33&""))

Got It many thanks to your help :bow: