Formatting text

Hockyplr

New Member
Joined
Aug 17, 2005
Messages
12
I have been looking for the answer on the boards but can't seem to find it.

What I am trying to do is this:

I have a VBA button that allows someone to input a name, this name is pre-formatted like this:

Lastname, Firstname

That is copied to a hidden column and used to pull data from a seperate excel document. The hidden column is B.

In Column C, I would like to use the information in Column B, but have it auto populate, and change the format to:

Firstname Lastname

That way the user, when setting up the spreadsheet, only needs to copy and paste the pre-formatted text in the input box and hit enter, and of course rinse and repeat for however many people they are placing on the sheet.

Thank you in advance!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Excellent! Thank much, works perfectly.

Did have one further question, unless there is an actual value, I get #VALUE! in every cell. Is there a way to do a check and if there is indeed no value in that cell, have it display a blank cell, yet continue to hold the formula I used in my original problem?

=TRIM(MID(B9&" "&B9,FIND(",",B9)+1,LEN(B9)))


Thanks again!

This board rules!
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

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