Sumifs returns 0 value

Erikku

New Member
Joined
Jan 20, 2015
Messages
5
Hi guys, would like to understand why is my formula giving me a zero value instead.


ABC
1datetypeQty
201/06/201510254866873
302/06/2015TM2115871
402/06/2015TM2115882
502/06/2015TM2115895
602/06/201510254866876
706/06/2015102544758712
807/06/201510253585791
907/06/201510258796871
1007/06/201510254866874

<tbody>
</tbody>

FORMULA TO GET TOTAL QTY FOR TYPE "TM" ON 02/06/2015
This formula gives the correct result.
=SUMIFS($C2:$C10,$A2:$A10,"02/06/2015",$B2:$B10,"TM*")

However for the following formula it returns a zero values instead of a value
=SUMIFS($C2:$C10,$A2:$A10,"02/06/2015",$B2:$B10,"1*")

Hope the veteran here could provide some help on this. Thanks in advance.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

liveinhope

Well-known Member
Joined
Dec 16, 2013
Messages
857
Excel sees The values in col "B" that start with a "1" as numbers not as text so doing a SUMIF on values that look like 1* doesn't work

One Solution is
-Insert a new column between B and C .

- enter this formula in C2 and drag down =TEXT(B2,"#####")
- change your SUMIF to look at c$2:c$10 instead of B$2:B$10
 
Upvote 0

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,886
Office Version
  1. 365
Platform
  1. Windows
SUMIF wont handle using a number with a wild card. You could use SUMPRODUCT.

=SUMPRODUCT((A2:A10="02/06/2015"+0)*(LEFT(B2:B10)="1")*C2:C10)
 
Upvote 0

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,895
Hi

... or, maybe you don't need those values as number values, and simply convert all values in column B to text. This avoids the auxiliary column.
 
Upvote 0

Forum statistics

Threads
1,195,828
Messages
6,011,829
Members
441,650
Latest member
ceyoung75

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
Top