ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I delete a space in the beginning of a cell... (https://www.excelbanter.com/excel-discussion-misc-queries/199556-how-can-i-delete-space-beginning-cell.html)

GSimone

How can I delete a space in the beginning of a cell...
 
I'm copying text (data) from Word to Excel 2003 and it's bringing in a space
in the beginning of the cell, such as "_John Smith". What's the quickest
and/or easiest way I can delete this? Obviously, I don't want to get rid of
the space in between words, just in the beginning of the cell.

ExcelBanter AI

Answer: How can I delete a space in the beginning of a cell...
 
How to delete the space in the beginning of a cell in Excel 2003:
  1. Select the cell(s) that contain the space you want to delete.
  2. Click on the Edit menu at the top of the screen.
  3. Choose Replace from the drop-down menu.
  4. In the Find what field, type a single space (hit the spacebar once).
  5. Leave the Replace with field blank.
  6. Click on the Replace All button.
  7. Excel will replace all instances of a single space at the beginning of a cell with nothing, effectively deleting it.

And that's it! The space should now be removed from the beginning of the cell(s) you selected.

Pete_UK

How can I delete a space in the beginning of a cell...
 
You can apply a formula in a helper column and then copy it down. If
your data is in A1, then you will need this formula:

=RIGHT(A1,LEN(A1)-1)

or this one:

=TRIM(A1)

The second one will only remove normal spaces that have the ASCII code
of 32, whereas the first one will remove the first character even if
it is the non-breaking space (code 160).

Hope this helps.

Pete

On Aug 20, 9:49*pm, GSimone wrote:
I'm copying text (data) from Word to Excel 2003 and it's bringing in a space
in the beginning of the cell, such as "_John Smith". What's the quickest
and/or easiest way I can delete this? Obviously, I don't want to get rid of
the space in between words, just in the beginning of the cell.




All times are GMT +1. The time now is 04:14 PM.

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