Formula

R

RENEE

I am trying create a formula that will sum a group of cells if the criteria in another cell meets either one of two criteria. The formula works with just one criteria...=SUMIF(B9,"C-MGT",AO9:BP9); however if I plug in an or function it falls apart.

The formula listed below worked, when referring to the sum of A09:BP9 calculated elsewhere in the sheet; however for sorting purposes, some of the cells have a space before or after, and the formula doesn't recognize anything whether the asterick is in the formula or the cell....=IF(OR(B9="C-MGT",B9="C-ADM"),BQ9,"")

Any ideas out there...
 
F

Frank Kabel

Hi
you're checking only one cell in your current SUMIF forumla. So you
probably should use
=IF(B9="C-MGT",SUM(AO9:BP9),"")

or for your OR statement use
=IF(OR(B9="C-MGT".B9?"C-ADM"),SUM(AO9:BP9),"")

Use SUMIF if you want to look into one column and sum the adjacent
column data if the criteria is met
 
R

Renee

Frank, I tried your formula, but I'm still getting an error message. What does the ".B9?" reference? Maybe that can help me figure this thing out.
 
F

Frank Kabel

Hi
sorry
a copy+paste error. try
or for your OR statement use
=IF(OR(B9="C-MGT",B9="C-ADM"),SUM(AO9:BP9),"")
 
Top