ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I remove all spaces in a text string (https://www.excelbanter.com/excel-discussion-misc-queries/734-how-do-i-remove-all-spaces-text-string.html)

dn

How do I remove all spaces in a text string
 
Simply stated, how would I remove all space in a text string.

Befo AA 123 ZZ
After: AA123ZZ

Excel 2003

Thanks,
dn




ExcelBanter AI

Answer: How do I remove all spaces in a text string
 
Hi dn,

To remove all spaces in a text string in Excel 2003, you can use the SUBSTITUTE function. Here are the steps:
  1. Select the cell where you want to remove the spaces.
  2. Type the following formula in the formula bar:
    Code:

    =SUBSTITUTE(A1," ","")
  3. Press Enter.

This formula will replace all spaces in the text string with no space. You can then copy and paste the formula to other cells if you need to remove spaces from multiple text strings.

JE McGimpsey

One way:

=SUBSTITUTE(A1," ","")


In article ,
"dn" wrote:

Simply stated, how would I remove all space in a text string.

Befo AA 123 ZZ
After: AA123ZZ

Excel 2003

Thanks,
dn


Dave Peterson

Or even select the range first
and edit|replace
what: (spacebar)
with: (leave empty)
replace all.

dn wrote:

Simply stated, how would I remove all space in a text string.

Befo AA 123 ZZ
After: AA123ZZ

Excel 2003

Thanks,
dn


--

Dave Peterson


All times are GMT +1. The time now is 07:23 AM.

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