Adding a space within a cells value

  • Thread starter Thread starter NewUser22
  • Start date Start date
N

NewUser22

I am trying to input a space within a cell, and then copy the task all
the way down the column for all the cells in that column. So each
cells value will change as follows.

G8599999
G7944444
G8155555

becomes

G85 99999
G79 44444
G81 55555

Is there a Macro I can use to accomplish this. I have tried to have
the Macro recorder record it however it just replaces each cell with
the same value that I recorded. I have also found some other
explanations of such a macro, however I could not understand them, so
any basic explanation of the code would be much appreciated. Thank you
very much for any help that can be provided.

-Keith
 
How about inserting an adjacent column and using a formula:

=left(a1,3)&" "&mid(a1,4,len(a1))
or
=if(a1="","",left(a1,3)&" "&mid(a1,4,len(a1)))

Then drag down the column.
Edit|Copy
edit|paste special|Values over the original range
and delete the helper column.
 
How about inserting an adjacent column and using a formula:

=left(a1,3)&" "&mid(a1,4,len(a1))
or
=if(a1="","",left(a1,3)&" "&mid(a1,4,len(a1)))

Then drag down the column.
Edit|Copy
edit|paste special|Values over the original range
and delete the helper column.








--

Dave Peterson- Hide quoted text -

- Show quoted text -

Thanks,

That did it perfectly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top