A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

insert space in cells



 
 
Thread Tools Display Modes
  #1  
Old June 9th 12, 02:45 AM posted to microsoft.public.excel.programming
robzrob
external usenet poster
 
Posts: 154
Default insert space in cells

Hi

Simple one, I think, but I can't figure it out.

I want to put a space in front of the contents of each cell (ie each cell that's got something in it) in a particular worksheet.
Ads
  #2  
Old June 9th 12, 03:23 AM posted to microsoft.public.excel.programming
Gord Dibben[_2_]
external usenet poster
 
Posts: 573
Default insert space in cells

=" " & cellref in a helper cell

In place.................

Sub add_space()
For Each cell In Selection
cell.Value = " " & cell.Value
Next
End Sub


Gord

On Fri, 8 Jun 2012 18:45:01 -0700 (PDT), robzrob >
wrote:

>Hi
>
>Simple one, I think, but I can't figure it out.
>
>I want to put a space in front of the contents of each cell (ie each cell that's got something in it) in a particular worksheet.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert a space in all blank cells of the first column andreashermle Excel Programming 4 December 11th 09 03:09 PM
Merge contents of cells and insert line space Craig Excel Worksheet Functions 3 June 9th 07 01:15 AM
Insert Space sabegirl Excel Discussion (Misc queries) 2 May 28th 06 04:44 AM
Insert Tab Space dok112[_108_] Excel Programming 2 March 29th 06 01:36 AM
How can I insert a space before the last character in a range of cells Jeff[_25_] Excel Programming 8 November 13th 03 07:45 PM


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


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