Sumif formula question

G

gkelle

I currently am using the formula with named ranges
=SumIf(JACap,"X",Capital)
This works fine, I would like to add another condition if another rang
"Expense" = "X" then exclude it from the total

I tried

if(Expense<>"X", SumIf(JACap,"X",Capital),0)

Any suggestions would be appreciated

TIA

[email protected]
 
F

Frank Kabel

Hi
try
=SUMPRODUCT(--(Expense<>"X"),--(JACap="X"),Capital)

Note: all defined names must have the same dimension. Also a reference
like A:A is not allowed
 
Top