ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to remove a space (https://www.excelbanter.com/excel-discussion-misc-queries/150510-how-remove-space.html)

Kevin

How to remove a space
 
Dear NG:

I copied and pasted my E-Z Pass statement into Excel as HTML.

I sorted the data by tag number.

If I highlight the cells with the "toll charges" for a specific tag number I
SHOULD get the total toll charges in the lower status bar.

Instead I get nothing.

Apparently there is a blank space in front of each entry in the toll
charges column. If I manually remove the blank space the charges
total up in the status bar as they should.

Is there any way to remove the space in front of each entry in the toll
column other than manually removing them?

I have a feeling I'm missing something very simple here.

Thanks in advance for any suggestions.

-Kevin



Mike H

How to remove a space
 
One way is to use a helper column with the formula:-

=trim(a1)

Drag this down for the length of your data and leading/trailing spaces will
be removed.

Mike

"Kevin" wrote:

Dear NG:

I copied and pasted my E-Z Pass statement into Excel as HTML.

I sorted the data by tag number.

If I highlight the cells with the "toll charges" for a specific tag number I
SHOULD get the total toll charges in the lower status bar.

Instead I get nothing.

Apparently there is a blank space in front of each entry in the toll
charges column. If I manually remove the blank space the charges
total up in the status bar as they should.

Is there any way to remove the space in front of each entry in the toll
column other than manually removing them?

I have a feeling I'm missing something very simple here.

Thanks in advance for any suggestions.

-Kevin




Dave Peterson

How to remove a space
 
Copying from web pages can be a problem. Sometimes what looks like a space
character isn't really a space character--it's one of those HTML non-breaking
spaces.

David McRitchie has a macro that cleans up this kind of stuff:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()")

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Kevin wrote:

Dear NG:

I copied and pasted my E-Z Pass statement into Excel as HTML.

I sorted the data by tag number.

If I highlight the cells with the "toll charges" for a specific tag number I
SHOULD get the total toll charges in the lower status bar.

Instead I get nothing.

Apparently there is a blank space in front of each entry in the toll
charges column. If I manually remove the blank space the charges
total up in the status bar as they should.

Is there any way to remove the space in front of each entry in the toll
column other than manually removing them?

I have a feeling I'm missing something very simple here.

Thanks in advance for any suggestions.

-Kevin


--

Dave Peterson

Kevin

How to remove a space
 
Dave Peterson,

Copying from web pages can be a problem.

Indeed.
The Trimall() macro did the trick.
Thanks.
-Kevin

"Dave Peterson" wrote in message
...
Copying from web pages can be a problem. Sometimes what looks like a
space
character isn't really a space character--it's one of those HTML
non-breaking
spaces.

David McRitchie has a macro that cleans up this kind of stuff:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()")

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Kevin wrote:

Dear NG:

I copied and pasted my E-Z Pass statement into Excel as HTML.

I sorted the data by tag number.

If I highlight the cells with the "toll charges" for a specific tag
number I
SHOULD get the total toll charges in the lower status bar.

Instead I get nothing.

Apparently there is a blank space in front of each entry in the toll
charges column. If I manually remove the blank space the charges
total up in the status bar as they should.

Is there any way to remove the space in front of each entry in the toll
column other than manually removing them?

I have a feeling I'm missing something very simple here.

Thanks in advance for any suggestions.

-Kevin


--

Dave Peterson




Tim879

How to remove a space
 
Kevin

the fastest way to do this is highlight the column that has the toll
charges, go to Edit- Replace and just replace the space with nothing
(i.e. put a space in the find box and leave the replace box empty)

Hope this helps.
Tim

On Jul 17, 8:46 am, "Kevin" wrote:
Dear NG:

I copied and pasted my E-Z Pass statement into Excel as HTML.

I sorted the data by tag number.

If I highlight the cells with the "toll charges" for a specific tag number I
SHOULD get the total toll charges in the lower status bar.

Instead I get nothing.

Apparently there is a blank space in front of each entry in the toll
charges column. If I manually remove the blank space the charges
total up in the status bar as they should.

Is there any way to remove the space in front of each entry in the toll
column other than manually removing them?

I have a feeling I'm missing something very simple here.

Thanks in advance for any suggestions.

-Kevin




Kevin

How to remove a space
 
Tim,

I tried that first thing. That didn't work. Dave Peterson explained why in
his post about it
not actually being a space but rather a HTML non-breaking space.

Aside from using the macro in DP's post I was also able to use Find and
Replace by holding down Alt and entering 0160 in the Find
feild and leaving Replace blank.

-Kevin

"Tim879" wrote in message
oups.com...
Kevin

the fastest way to do this is highlight the column that has the toll
charges, go to Edit- Replace and just replace the space with nothing
(i.e. put a space in the find box and leave the replace box empty)

Hope this helps.
Tim

On Jul 17, 8:46 am, "Kevin" wrote:
Dear NG:

I copied and pasted my E-Z Pass statement into Excel as HTML.

I sorted the data by tag number.

If I highlight the cells with the "toll charges" for a specific tag
number I
SHOULD get the total toll charges in the lower status bar.

Instead I get nothing.

Apparently there is a blank space in front of each entry in the toll
charges column. If I manually remove the blank space the charges
total up in the status bar as they should.

Is there any way to remove the space in front of each entry in the toll
column other than manually removing them?

I have a feeling I'm missing something very simple here.

Thanks in advance for any suggestions.

-Kevin







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

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