ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   insert space in cells (https://www.excelbanter.com/excel-programming/446278-insert-space-cells.html)

robzrob

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.

Gord Dibben[_2_]

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.



All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com