Sum values based on a word in a text string

Andy.C

New Member
Joined
Sep 13, 2010
Messages
2
Hi All, really hope you can help!!

I need to sum values based on finding a word in a text string, but the word may be in a different place in each string. eg....

South York Distribution
Research East York
Unit 4 North York Goods inwards

The text will always be in the same column and the values in the adjacent column.

Thanks

Andy
 

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.
This will sum the values in column B when "York" is found within an adjacent cell in column A

=SUMIF(A:A, "*York*", B:B)

Note: if you had a word like Yorkshire in column A, that would count as a match.
 
Last edited:
Upvote 0
Try like this

Excel Workbook
ABCD
1South York Distribution16
2Research East York2
3Unit 4 North York Goods inwards3
4East London4
Sheet1
 
Upvote 0
Have a look at the =FIND() and =SEARCH() functions.

Are you looking to sum a value in another column depending on these results? If so, maybe countif with wildcards

=COUNTIF(A1:A4,"*york*")
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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