PC Review


Reply
Thread Tools Rate Thread

Adding a space within a cells value

 
 
NewUser22
Guest
Posts: n/a
 
      10th Jul 2007
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

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      10th Jul 2007
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.


NewUser22 wrote:
>
> 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


--

Dave Peterson
 
Reply With Quote
 
NewUser22
Guest
Posts: n/a
 
      11th Jul 2007
On Jul 10, 5:13 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> 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.
>
>
>
>
>
> NewUser22 wrote:
>
> > 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

>
> --
>
> Dave Peterson- Hide quoted text -
>
> - Show quoted text -


Thanks,

That did it perfectly.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
merging 2 cells and adding a space. paul Microsoft Excel Misc 1 6th Feb 2009 09:36 PM
Adding up range of cells exclude hide cells Len Microsoft Excel Programming 7 26th May 2008 02:36 PM
Adding comment to cells not working with merged cells =?Utf-8?B?bWNwaGM=?= Microsoft Excel Programming 2 29th Aug 2007 07:09 PM
Adding colour to a range of cells based on one of the cells v... =?Utf-8?B?TWNLZW5uYQ==?= Microsoft Excel Misc 4 11th Mar 2005 02:25 PM
adding/deleting cells in a named range of cells Tat Microsoft Excel Worksheet Functions 2 18th Nov 2003 03:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:50 AM.