# A SUMIF function

#### jcardinal

##### New Member
Hello y'all,

I need to write a statement that sums up certain values referenced in the IF statement. For example, I have 10 columns of data; five of those are the subjects and the other five are the corresponding values. The columns alternate with subject1,value1,subject2,value2...

The problem is that when subject1 and subject2 are the same my formula returns the first value1 and not the sum. So say three of the five subjects are the same I would want to ADD all of those values with respect to the three subjects.

-------
Here is the data and my formula:

=SUM(IF(\$BG11="Waiting Material",\$BH11,IF(\$BI11="Waiting Material",\$BJ11,IF(\$BK11="Waiting Material",\$BL11,IF(\$BM11="Waiting Material",\$BN11,IF(\$BO11="Waiting Material",\$BP11,0))))))

BG BH BI BJ BK BL
Waiting Material 18.48 Being Serviced 24.00 Waiting Material 0.02

BM BN BO BP
Needing Material 0.00 Waiting Material 17.57

-------
I seperated the columns because the text overruns the page. And this chosen data just happened to come from row11.

So right no my formula only return 18.48, but it should return the total of 18.48+.02+17.57=>>"36.07"

### Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

=SUMIF(\$BG\$11:\$BO\$100,"Waiting Material",\$BH11:\$BP100)

Thanks a bunch

Al,

Thanks for much for the help
A++++ and a five gold stars for you. I really appreicate it!!!!

Replies
3
Views
389
Replies
7
Views
574
Replies
4
Views
856
Replies
8
Views
3K

1,217,478
Messages
6,136,898
Members
450,029
Latest member
MissQuotation

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back