Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How can I insert 2 spaces at the beginning of each of 1300 cells?

Rather than go through each of 1300 cells in a column to add a ' and 2
spaces, so that the column will match up when I import it into Access, how
can I quickly add 2 spaces to the left of the text data in each column?
  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default How can I insert 2 spaces at the beginning of each of 1300 cells?

Format the column for Custom and use space space @ as the format type
Hard to type an example, <g but maybe (__@) without the parenthesis and
replacing the underscores with spaces....whew


Vaya con Dios,
Chuck, CABGx3



"spaceless in Dallas" wrote:

Rather than go through each of 1300 cells in a column to add a ' and 2
spaces, so that the column will match up when I import it into Access, how
can I quickly add 2 spaces to the left of the text data in each column?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How can I insert 2 spaces at the beginning of each of 1300 cells?


spaceless in Dallas wrote:
Rather than go through each of 1300 cells in a column to add a ' and 2
spaces, so that the column will match up when I import it into Access, how
can I quickly add 2 spaces to the left of the text data in each column?


Another way is to write a quick bit of vb to do the work for you.
example:

Sub addSpaces()
Dim x, y As intergers
For x = 1 To 5 '(how ever rows you need to cover)
For y = 1 To 6 '(how ever many columns you need to cover)
ActiveSheet.Cells(x, y).Value = "' " & ActiveSheet.Cells(x,
y).Value
Next y
Next x
End Sub

should also note that your starting point for x and y should be the
reference to where the first cell of the data is at.

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
Calculating only non-empty cells... Jay Excel Worksheet Functions 9 September 22nd 06 03:20 AM
How do I count cells with text but ignore cells with spaces? Husker87 Excel Discussion (Misc queries) 2 September 21st 06 12:31 AM
key board short cut for insert cut cells R. D. Childers Excel Discussion (Misc queries) 3 February 8th 06 07:45 PM
Removing spaces in cells with data in it Ltat42a Excel Discussion (Misc queries) 7 August 7th 05 01:40 PM
Sumproduct ... Empty Cells vs Spaces? Ken Excel Discussion (Misc queries) 9 December 17th 04 08:03 PM


All times are GMT +1. The time now is 01:20 PM.

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

About Us

"It's about Microsoft Excel"