If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
deleting spaces
In a column of cells, tha majority of cells have spaces before the text. As
there are over 500 cells, is there any easy way to delete these spaces? As there are spaces in between words within these cells, I don't want to delete all spaces, but just the first one which comes in front of the text. |
#2
|
|||
|
|||
deleting spaces
Hi Continental............,
Suggest using the TRIMALL macro http://www.mvps.org/dmcritchie/excel/join.htm#trimall And if you got the material from an HTML page then they probably are CHAR(160) nonbreaking space (  rather than actual spaces Char(32), both of which are covered in the macro. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Continental Translations" wrote in message ... In a column of cells, tha majority of cells have spaces before the text. As there are over 500 cells, is there any easy way to delete these spaces? As there are spaces in between words within these cells, I don't want to delete all spaces, but just the first one which comes in front of the text. |
#3
|
|||
|
|||
deleting spaces
You could try using a "helper" column with a formula to eliminate leading
and trailing spaces. Then, you delete the formula, and leave the revised data behind. With data starting in A1, enter this in B1: =TRIM(A1) Now, select B1, and double click on the "fill handle" (little black square) in the lower right corner of the selected cell. This will copy the formula down column B, as far as there is data in column A. Now, while column B is *still* selected, right click in the selection and choose "Copy". Right click *again* in the selection, and choose "PasteSpecial". Choose "Values", then OK. You now have column B with your revised data, where you may delete the original column if desired. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Continental Translations" wrote in message ... In a column of cells, tha majority of cells have spaces before the text. As there are over 500 cells, is there any easy way to delete these spaces? As there are spaces in between words within these cells, I don't want to delete all spaces, but just the first one which comes in front of the text. |
Thread Tools | |
Display Modes | |
|
|