VBA to Split Name When the Name is the Output From VLOOKUP

DavidWF

Board Regular
Joined
Oct 14, 2015
Messages
130
I use VLOOKUP to bring a person's name from a database into a form. In the database the name always has the format of christian name(s) followed by surname. There can be 1, or 2, or however many christian names.

The form requires that I enter surname in one cell and christian name(s) in a separate cell so I need to split the name.

The problem that I'm having, when I try the various methods that have previously been posted for splitting names, is that the underlying VLOOKUP formula gets split, not the visible output from the formula.

How do I resolve this so that the visible name gets split, not the underlying formula? At the moment I'm bringing the full name into cell AJ3; the surname has to be put into cell F37 and the christian name(s) into S37. If it helps, there's plenty of spare real estate to the right of the form, so if a helper cell is needed for temporary data, any cell (other than AJ3) to the right of col AH and between rows 1 to 50, is available. I'll assign the coding to a "Split Names" button on the worksheet.
 
Perfect!!

Thanks AlphaFrog and Fluff - your assistance is very much appreciated.

Have a great Christmas.
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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