EXCEL SUM with multiple criteria for cells range
Posted on 2012-03-28
I need to insert a SUM formula with multiple criteria for a cell range.
Because there are multiple criteria, I cannot use SUMIF
The criteria are for text cells.
I tried this formula: =SUM(IF((K18="Y")+(K18=""),H18,0))
And it works for a single record.
But If I try to use a range of cell, such as: =SUM(IF((K18:K20="Y")+(K18:K20=""),H18:20,0))
The formula does not work. I have either wrong data type error or it does not work at all, just displays the formula.
My real formula is more complicated, but I just want to make sure the formula works.
The formula I used above is pretty much meaningless, the idea is to have a sum of cells in the column H if cells in column K are contain values of Y or blank.
I have Excel 2010, I use Ctrl/Shift/Enter before entering the formula.
Could you please suggest how to do it?