Find & Substitute Full Names with First Name

servcoor

New Member
Joined
Jan 6, 2003
Messages
45
Hi, all.

On a daily basis, I use a data table having 4 columns and up to 500 rows or more to create a pivot table. In my data table, one column contains user's full names. There may be 12 or more different names, and each name may appear dozens of times each throughout the table. Since the pivot table I create from this data table uses the names column for one of its Data columns, displaying the full names causes the pivot table to be wider than we would like. I want to substitute the full names with each user's first name only. Example: "Williams, Stephen R" would be displayed in my pivot table as "Steve", and so on.

Any assistance with this substitution would be greatly appreciated. I have attempted to use the SUBSTITUTE function, but so far haven't been successful.

Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Thanks, SteveO - I'm trying to apply your suggestion...I beg your patience, but I haven't figured out how to "tabulate" the relationship...I get that my tabulation needs to assign "Steve" to the name “Williams, Steven R” and so on and then use VLOOKUP to find every occurrence of “Steve” in my new table, but how would I set up that tabulation? Also, I’ve used VLOOKUP successfully when the value looked for occurred only once within the table, however I cannot figure out how to get it to work when the values occur multiple times. Every example I’ve found in online tutorials shows using VLOOKUP to find single occurrences of unique identifiers, not multiple occurrences.

I hope I’m clearly explaining my needs and questions.

Thank you for your attempts to help me.
 
Upvote 0
Update: ok, nevermind what I said before about not being able to get VLOOKUP to work for multiple occurrences of an identifier within the table. I got that. Sorry. So that function is ok.

The piece I'm still unable to make work is how to substitute a first name for any/all occurrences of the full name within the table. Example: if my original data table has 30 rows of "Williams, Stephen R" how do I automate the substitution of "Steve" for that full name? The number of rows containing that full name - and all of the other names in my table - will vary from day-to-day so I need each substitution to be automated. Find each of the full names, substitute with the person's first name only. I think this is what Steve-O meant when he said I need to tabulate my relationships, but I haven't figured out how to do that yet.

Thanks again!
 
Upvote 0
I think I would start by giving each staff member a unique ID. Then use that as the key value in your vlookup()

If you send me a pm with your e-mail, I will send you a worked example
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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