# SUMIF

#### lkjing

##### Board Regular
Hi...I can't seem to use the SUMIF function to calculate a criteria. Despite thorough checks through the formula, the function keeps returning zero for the answer. I am using two linked spreadsheets. One is for the data and the other is for the report. In the data spreadsheet, A1:A5 for example have several data like buyer, order quantity...While B1:B5 have the necessary inputs. I tried to use the formula SUMIF to calulate Order Quantity in the report spreadsheet to no avail. The Formula is I'm using is something like this SUMIF(A1:A5;=Order Quantity;B1:B5). Can anybody help? Thanks

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

##### Board Regular
In a sumif formula the syntax is sumif(range, criteria, sumrange). The middle criteria is the item you want sumed. In your formula Excel doesn't understand what "=OrderQuanity" is.

HT

#### meb

##### New Member
If A1:A5 and B1:B5 are in the same sheet then
sumif(A1:A5,"order quantity",B1:b5) should producte what you are
looking for.

#### lkjing

##### Board Regular
Unfortunately the result that returned is 0. If the Excel can't read = Order Quantity, what criteria should I put? Spent the whole afternoon meddling with it but still unable to find a solution..

#### lkjing

##### Board Regular
A1:A5 And B1:B5 Are in the same sheet

##### Board Regular
What is "Order Quantity" ? Is it a label or a range?

HT

#### ken2step

##### Well-known Member
Is Order Quanity a Named range? If not then Excel can not read your mind. Post what OQ relates to and I think we will solve this one!

#### lkjing

##### Board Regular
it's a label. Order Quantity is the amount of goods customer ordered. For example in A2 Cell= Order Quantity B2 Cell= 1000 . Or do u guys have any suggestions on alternative formula?

##### Board Regular
Try linking to the cell with Order Quantity instead of writting it in the formula. Like this:

=SUMIF(A1:A5,A2,B1:B5)

HT

Replies
1
Views
87
Replies
4
Views
162
Replies
30
Views
560
Replies
9
Views
179
Replies
4
Views
157

1,181,256
Messages
5,928,970
Members
436,637
Latest member
pcpc

### 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