# 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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

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

#### KalleeP

##### Board Regular

Replies
4
Views
338
Replies
3
Views
320
Replies
5
Views
145
Replies
1
Views
46
Replies
4
Views
360

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

1,151,579
Messages
5,765,208
Members
425,265
Latest member
bishopc22

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