Trying to nest MID funciton within SUMIFS

AGibo

New Member
Joined
Sep 14, 2011
Messages
4
Hi there,
Can someone please tell me what is wrong with this syntax??
Nesting the MID function seems to throw it out.

=SUMIFS(Bring_in!D:D,MID(Bring_in!N:N,4,4),A$3)
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
The data in Column N is in format 10.1020.00000.50001 through to 10.1020.00000.50009 A$3 is 50001. So we want to sum values where the last quad of Column N is 50001.
 
Upvote 0
Hello AGibo, you can't modify a range in SUMIFS with a function like MID, try turning that round to use wildcards.

From your initial formula that looked like A3 contains the 1020 part (4 characters from character 4) but if A3 = 50001 then try

=SUMIFS(Bring_in!D:D,Bring_in!N:N,"*"&A$3)
 
Upvote 0
Use a wildcard.

=SUMIFS(D:D,N:N, "*"&A3)

PS Doesn't 50001 have 5 digits? To extract that you can use =RIGHT(N1, 5)
 
Upvote 0
Thanks all. Using the wildcards has solved my issue. And worth saying thanks again for the more than prompt replies I have received.

Hoping I can return the favour to other users one day,
 
Upvote 0
Hi there,
Can someone please tell me what is wrong with this syntax??
Nesting the MID function seems to throw it out.

=SUMIFS(Bring_in!D:D,MID(Bring_in!N:N,4,4),A$3)
Since there is just a single condition you can use SUMIF.

=SUMIF(Bring_in!N:N,"*"&A$3,Bring_in!D:D)
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
rootytrip

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