Sumif problem

R

robi

I can't quite work this out.

I want to sum a group of numbers dependant on the criteria in the row.

it looks like this:

Rural Town 0 0 0 0 0 8865
CBD 3596 4205 3853 3841 4028
Rural Town 5463 5503 6065 5953 5915 6056
Suburban 0 6739 6999 7604
CBD 0 0 0 5220 5138
Rural Town 4918 4721 5218 5810 5284 5180
Rural Town 0 0 0 7265 7403 7790

I only want to sum the CBD, or rural etc

Any ideas anyone on how the sumif would work?

Thanks in advance.

PS, I can't sort them so need to do it in a formula.
 
C

C01d

Total
CBD 57 8 2 67
A 56 2 3 61
Rural 5 56 4 65
CBD 65 84 65 214
=SUMIF(A2:A5,"=CBD",E2:E5)
=SUMIF(A2:A5,"=Rural",E2:E5)
=E6+E
 
R

Ron Coderre

Robi:

Try this:

=SUMPRODUCT(($A$1:$A$7={"Rural Town","CBD"})*B1:B7)

That formula sums the Col_B values where the Col_A value is either
"Rural Town" or "CBD".

Does that help?

Regards,
Ron
 
Top