Thread: [Solved] Countifs and Sumproduct
View Single Post
 
Old 11-08-2012, 02:26 AM
Algo Algo is offline Windows Vista Office 2007
Novice
 
Join Date: Nov 2012
Posts: 3
Algo is on a distinguished road
Default Countifs and Sumproduct

Can Countifs and Sumproduct work together?
I have a column I4:I80. In this column, all the cells have either text "NF" or "F". Some of these cells are coloured light grey and some are not. I want to have a formula that will count the number of NF or F that are only in the light grey cells.

This is the formula I used for counting the number of "F" :

=countifs(I4:I80,"=F", I4:I80,"=sumproduct(--(colorindex(I4:I80)=colorindex(I87)))")

I87 is the cell where I have the light grey colour highlighted for reference.

Why does the formula return a 0 (zero) for both NF and F? (I have 20 NF and 8 F in light grey coloured cells.)

Attached is the function for colorindex.

Can anyone help? Thank you
Attached Files
File Type: docx ColorIndex Function.docx (12.0 KB, 9 views)

Last edited by Algo; 11-08-2012 at 05:14 AM. Reason: Mistake in the above countifs formula
Reply With Quote