sumif combined text/number?

MOB

Well-known Member
Joined
Oct 18, 2005
Messages
1,055
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
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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.
 
Upvote 0
If it's always the 3rd character you're interested in, you could use
Excel Formula:
=SUMIF(B:B,"??5",C:C)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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