Sum values based on multiple words found in string of text

hartsie

Board Regular
Joined
May 6, 2020
Messages
84
Office Version
  1. 2016
Hello,

I have what I think to be a tricky VBA job.

I have two tables, one with single names, and the other with full names. I am going to assign a numerical sum based on the combination of single names found in full names. For example: Bob = 5, Michael = 6, Scott = 7. With name and number residing in two columns in one table. This is the "lookup" range. The other table contains full names. The column with full names would be range "Flname." When I perform a lookup, I would like to sum and post the results of the relative values in range "sumrng." So, the name in flname "Bob Michael Scott" would sum to 18, "Scott Michael" to 13, "Bob Scott" to 12, and "Michael Scott" to 13 in sumrng.

This seems like something that is possible in VBA... but I have searched the interwebs far and wide and I couldn't think of the best way to describe this for my search parameters.

If anyone knows if this is possible, please let me know. All you VBAers out there are truly talented people.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,215,056
Messages
6,122,907
Members
449,096
Latest member
dbomb1414

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