SUMIF

lkjing

Board Regular
Joined
Jan 27, 2005
Messages
111
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
 
I can't use words for tt? I'm goin to repeat the data format in A1:A5 down the column so i hope to use SUMIF to calculate the total amount of OT.
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi lkjing,

From your original post your Data Sheet sounds like it looks like the following. If so, what is it you are trying to get onto your report sheet?
Book3
ABCD
1BuyerJoeBloggs
2OrderQuantity1000
3Orderdate1/01/2005
4DispatchDate15/01/2005
5AreaCodeST170DP
Data Sheet
 
Upvote 0
Hi again,

Guessing from your last post, does your Data Sheet look like this?
Book3
ABCD
1BuyerJoeBloggs
2OrderQuantity1000
3Orderdate1/01/2005
4DispatchDate15/01/2005
5AreaCodeST170DP
6BuyerSnowWhite
7OrderQuantity1500
8Orderdate2/01/2005
9DispatchDate6/01/2005
10AreaCodexxxyyy
11BuyerPinnochio
12OrderQuantity5300
13Orderdate12/12/2004
14DispatchDate25/12/2004
15AreaCodeabc123
16BuyerPoohBear
17OrderQuantity2000
18Orderdate14/01/2005
19DispatchDate20/01/2005
20AreaCodekkk678
Data Sheet


If so maybe this is what you want on your Report Sheet:
Book3
ABCD
1TotalOrders:9800
Report


Formula in Cell B2 on Report Sheet is : =SUMIF('Data Sheet'!A1:A20,"Order Quantity",'Data Sheet'!B1:B20)

Does that help?
 
Upvote 0
yeah it's exactly the same..but i tried using similar formula but the answer returned a ZERO...It doesnt quite add up...Or is something to do with the cell format though I did not do anything to it...
 
Upvote 0
Hi lkjing,

The formula you quoted in your first post was: =SUMIF(A1:A5;=Order Quantity;B1:B5).

compare that with the one I gave you: =SUMIF('Data Sheet'!A1:A20,"Order Quantity",'Data Sheet'!B1:B20)

Forgetting the 'Data Sheet'! bit, which was necessary because the formula was on your other linked Report Sheet, you will see that:

1) Order Quantity needs quotes around it because it's text,
2) No need for the = sign
3) you had semi-colons where you should have had commas

All of which add up to an incorrect formula :wink:
 
Upvote 0
As an after thought - if you don't know how long your Data Sheet will get as you add further data you can write the formula as : =SUMIF('Data Sheet'!A:A,"Order Quantity",'Data Sheet'!B:B)
 
Upvote 0
So how do i go about using the "Data Sheet" ? I mean do i juz type it in? or do i have to name the whole list as "Data Sheet"?
 
Upvote 0
Hi Fergus..
I Don't exactly catch what you mean..What do you mean by OT needs quotes around it? Thanks
 
Upvote 0
Hi again,

I assumed your data sheet was named Data Sheet and your report was in a separate worksheet called Report. You can re-name worksheets by right clicking on the sheet tab (the tab at the bottom which when you first open a new workbook are called Sheet1, Sheet2 etc.)

And Yes Order Quantity needs to be written the same as it is written on the Data Sheet with quotes around it - i.e. "Order Quantity" - as shown in my formula. Without quotes it will return an answer of zero even if all other parts of the formula are correct as described above.

You can copy formulas directly off posts on this Board by highlighting, right clicking and selecting copy. Then click on the cell in your worksheet where you want them, right clicking and selecting paste.

Is that enough to be going on with?
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top