ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Insert spaces in text string in Excel (https://www.excelbanter.com/excel-discussion-misc-queries/114592-insert-spaces-text-string-excel.html)

GenaroJP

Insert spaces in text string in Excel
 
I have text stings comprised of twenty characters, eg. 89014104201060525494
I want to add four spaces between every fourth character, eg. 8901 4104 2010
6052 5494. How can I format a cell to do this in Excel?

David Biddulph

Insert spaces in text string in Excel
 
I'm not convinced you can do it by formatting, but you could use a helper
column, along the lines of
=LEFT(A1,4)&" "&MID(A1,5,4)&" "&MID(A1,9,4)&" "&MID(A1,13,4)&" "&RIGHT(A1,4)
--
David Biddulph

"GenaroJP" wrote in message
...
I have text stings comprised of twenty characters, eg. 89014104201060525494
I want to add four spaces between every fourth character, eg. 8901 4104
2010
6052 5494. How can I format a cell to do this in Excel?





All times are GMT +1. The time now is 03:09 AM.

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