# sumif combined text/number?

#### MOB

##### Well-known Member
Some data I am using a sumif on has combined text and numbers, and I need to base it on just the number without using a helper column, eg;

DL15
DL5
MK15
MK5

My approach was =sumif(B:B,"*5",C:C)

However it will pick up all of the above examples, when I only want the result for DL5 & MK5 including.

Is there a simple way to amend my formula?

TIA

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

#### jasonb75

##### Well-known Member
If it is always 2 letters followed by a number then I would try something like
Excel Formula:
``=SUMPRODUCT(--((--MID(B2:B5,3,3))=5),C2:C5)``
It will be less efficient, but I don't see a way to do what you want with sumif and no helper column.

#### Fluff

##### MrExcel MVP, Moderator
If it's always the 3rd character you're interested in, you could use
Excel Formula:
``=SUMIF(B:B,"??5",C:C)``

Thanks both

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback.

Replies
5
Views
344
Replies
11
Views
178
Replies
5
Views
70
Replies
5
Views
79
Replies
11
Views
225

1,127,487
Messages
5,625,054
Members
416,067
Latest member
newb08

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