ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel TRIM() can't handle   in pasted HTML (https://www.excelbanter.com/excel-discussion-misc-queries/20022-excel-trim-cant-handle-pasted-html.html)

dyt

Excel TRIM() can't handle   in pasted HTML
 
Has anyone seen this kind of misbehavior?

1. Create a table in HTML like:
<table<tr
<td align="right" nowrap214,074&nbsp;</td
<td align="right" nowrap55,859&nbsp;</td
<td align="right" nowrap26.09&nbsp;</td
<td align="right" nowrap267,102&nbsp;</td
<td align="right" nowrap71,365&nbsp;</td
<td align="right" nowrap26.72&nbsp;</td
</tr</table
(this is actually created by a very silly application
we bought)

2. Display it in your favorite browser
3. Copy it into an Excel spreadsheet
4. try to trim() or value() any of the values to get a
number. Doesn't work! What works is '=value(a1,len(a1)-
1)

!!!!




Bob Phillips

=substitute(a1,CHAR(160),"")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dyt" wrote in message
...
Has anyone seen this kind of misbehavior?

1. Create a table in HTML like:
<table<tr
<td align="right" nowrap214,074&nbsp;</td
<td align="right" nowrap55,859&nbsp;</td
<td align="right" nowrap26.09&nbsp;</td
<td align="right" nowrap267,102&nbsp;</td
<td align="right" nowrap71,365&nbsp;</td
<td align="right" nowrap26.72&nbsp;</td
</tr</table
(this is actually created by a very silly application
we bought)

2. Display it in your favorite browser
3. Copy it into an Excel spreadsheet
4. try to trim() or value() any of the values to get a
number. Doesn't work! What works is '=value(a1,len(a1)-
1)

!!!!






Fredrik Wahlgren


"dyt" wrote in message
...
Has anyone seen this kind of misbehavior?

1. Create a table in HTML like:
<table<tr
<td align="right" nowrap214,074&nbsp;</td
<td align="right" nowrap55,859&nbsp;</td
<td align="right" nowrap26.09&nbsp;</td
<td align="right" nowrap267,102&nbsp;</td
<td align="right" nowrap71,365&nbsp;</td
<td align="right" nowrap26.72&nbsp;</td
</tr</table
(this is actually created by a very silly application
we bought)

2. Display it in your favorite browser
3. Copy it into an Excel spreadsheet
4. try to trim() or value() any of the values to get a
number. Doesn't work! What works is '=value(a1,len(a1)-
1)

!!!!


Why not simply open the html page in notepad and do a find and replace on
&nbsp?

/Fredrik




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

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