sumif combined text/number?

MOB

Well-known Member
Joined
Oct 18, 2005
Messages
1,035
Office Version
  1. 365
Platform
  1. Windows
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
 

Some videos you may like

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
Joined
Dec 30, 2008
Messages
12,438
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Jun 12, 2014
Messages
55,502
Office Version
  1. 365
Platform
  1. Windows
If it's always the 3rd character you're interested in, you could use
Excel Formula:
=SUMIF(B:B,"??5",C:C)
 

MOB

Well-known Member
Joined
Oct 18, 2005
Messages
1,035
Office Version
  1. 365
Platform
  1. Windows
Thanks both :)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,502
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
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.
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