ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Embedding spaces in an Excel file ... (https://www.excelbanter.com/excel-discussion-misc-queries/126816-embedding-spaces-excel-file.html)

GBF

Embedding spaces in an Excel file ...
 
I want to embed 2 spaces at the end of a cell. The cells will be strung
together in a sentence & I want to separate each cell with 2 spaces. Any
ideas on how to do this? Thanks in advance - GBF

cory

Embedding spaces in an Excel file ...
 
Another suggestion would be to use the (Concatenate) formula. This formula
adds text strings together. Ex: Concatenate(A1," ",A2).
--
CCO


"Gary''s Student" wrote:

Without VBA:

lets say we have text in cell A1. In an un-used (helper) cell enter:
=A1 & " "
copy the helper cell and paste/special as value back onto A1. This will
leave A1 with the original contents and two spaces added to the end. This
can be very tedious if done cell-by-cell.

With VBA, enter this small macro:

Sub paddum()
For Each r In Selection
r.Value = r.Value & " "
Next
End Sub

Select the cells you want to pad and run the macro. If you are unfamiliar
with VBA, See:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Gary's Student
gsnu200702


"GBF" wrote:

I want to embed 2 spaces at the end of a cell. The cells will be strung
together in a sentence & I want to separate each cell with 2 spaces. Any
ideas on how to do this? Thanks in advance - GBF


Gary''s Student

Embedding spaces in an Excel file ...
 
Without VBA:

lets say we have text in cell A1. In an un-used (helper) cell enter:
=A1 & " "
copy the helper cell and paste/special as value back onto A1. This will
leave A1 with the original contents and two spaces added to the end. This
can be very tedious if done cell-by-cell.

With VBA, enter this small macro:

Sub paddum()
For Each r In Selection
r.Value = r.Value & " "
Next
End Sub

Select the cells you want to pad and run the macro. If you are unfamiliar
with VBA, See:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Gary's Student
gsnu200702


"GBF" wrote:

I want to embed 2 spaces at the end of a cell. The cells will be strung
together in a sentence & I want to separate each cell with 2 spaces. Any
ideas on how to do this? Thanks in advance - GBF



All times are GMT +1. The time now is 06:01 AM.

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