SUMIFS and wildcards

coake

New Member
Joined
Aug 23, 2017
Messages
34
Hey folks,
Just looking for some advise on how to fix this.

Problem: Double counting because of the wildcard.
What I'm trying to do is sum all 11.20 for the month of X and sum all of 11.2 for the month of X

Data:
3-Jun-18

<tbody>
</tbody>
180433 FN - 11.20 HRV First Nation Medic

<tbody>
</tbody>
$150.00

<tbody>
</tbody>
01-Jul-18

<tbody>
</tbody>
180433 FN - 11.20 HRV First Nation Medic

<tbody>
</tbody>
$750.00

<tbody>
</tbody>
01-Jul-18

<tbody>
</tbody>
180433 FN - 11.20 HRV First Nation Medic

<tbody>
</tbody>
$750.00

<tbody>
</tbody>
02-Jul-18

<tbody>
</tbody>
180433 FN - 11.20 HRV First Nation Medic

<tbody>
</tbody>
$750.00

<tbody>
</tbody>
02-Jul-18

<tbody>
</tbody>
180433 FN - 11.20 HRV First Nation Medic

<tbody>
</tbody>
$750.00

<tbody>
</tbody>
02-Jul-18

<tbody>
</tbody>
180433 33445 FN - 11.2 Mc Lk FNation Medic

<tbody>
</tbody>
$150.00

<tbody>
</tbody>
02-Jul-18

<tbody>
</tbody>
180433 33445 FN - 11.2 Mc Lk FNation Medic

<tbody>
</tbody>
$75.00

<tbody>
</tbody>
3-Jun-18

<tbody>
</tbody>
180433 33445 FN - 11.2 Mc Lk FNation Medic

<tbody>
</tbody>
$150.00

<tbody>
</tbody>
3-Jun-18

<tbody>
</tbody>
180433 33445 FN - 11.2 Mc Lk FNation Medic

<tbody>
</tbody>
$75.00

<tbody>
</tbody>
7-Jun-18

<tbody>
</tbody>
180433 33445 FN - 11.2 Mc Lk FNation Medic

<tbody>
</tbody>
$150.00

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>

My formula is:
=SUMIFS(DATA!K:K,DATA!D:D,">="&DATE(2018,7,1),DATA!D:D,"<="&DATE(2018,7,31),DATA!E:E,"*" & A97 & "*")

This formula sums both the 11.2 and the 11.20 :(
Also, the number I'm focusing on (11.20) is not always at position 13

Any suggestions?

Cliff
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Maybe...

=SUMIFS(DATA!K:K,DATA!D:D,">="&DATE(2018,7,1),DATA!D:D,"<="&DATE(2018,7,31),DATA!E:E,"* "&A97&" *")

Note the spaces: "* " and " *"

M.
 
Upvote 0
Awesome thanks Marcelo. The leading space doesn't affect it, but the 2nd " *" will pull the single numbers perfectly.
 
Upvote 0

Forum statistics

Threads
1,214,669
Messages
6,120,828
Members
448,990
Latest member
rohitsomani

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