Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Adding a space within a cells value

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Adding a space within a cells value

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Adding a space within a cells value

On Jul 10, 5:13 pm, Dave Peterson 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
merging 2 cells and adding a space. paul Excel Discussion (Misc queries) 1 February 6th 09 09:36 PM
Adding more space in a pulldown box? jcolley05 Excel Discussion (Misc queries) 2 February 18th 08 11:46 PM
Adding a space eddie57[_2_] Excel Worksheet Functions 3 August 6th 07 06:08 PM
Adding a space? Sjakkie Excel Programming 2 February 27th 07 02:05 PM
Adding a space with =A59&B59 Jim Excel Worksheet Functions 1 May 17th 05 12:37 AM


All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"