EXCEL1: Macro to insert 1 Space

aacod

Well-known Member
Joined
Mar 20, 2009
Messages
667
I have hundreds of names in column D from D5 to D5000.

I need to insert 1 space before the start of the name.

E.g.

Now:
Smith

Result:
Smith

Can anyone help with a macro?

Thanks.

aacod
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Non VBA solution.

E5
Code:
=" "&d5

drag down.

Then Copy => paste special => values (Collumn E to D).

Delete collumn E.

I have a question?

Why is it important to add an " ".
Mostely the question is how to remove the " ".
 
Upvote 0
Oeldere, Thanks for the NON VBA solution, which works.

The reason why I want a macro is because when I mail merge in word document to print, It may not recognize the name and may just print the formula!!!! Though not sure.
 
Upvote 0
If you choose paste speical => values

There are no formula's in the cell.

In this case there will be no problem.

I don't mind you're seeking a solution with VBA, but i can't help you enough with that.
 
Upvote 0
If you copy and paste special values, all the cell formulas will be deleted and only names will be shown so no need to worry about formulas printing.
 
Upvote 0
Glad I could help. Thanks for the reply.<o:p></o:p>
<o:p> </o:p>
If the question is solved, will you mark your question as solved?<o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,219,161
Messages
6,146,657
Members
450,706
Latest member
LGVBPP

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