![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I am importing a table from a Web page by just cutting and pasting. (Yes it is legal) Everything appears to work except for the number strings that have a decimal point. Upon closer inspection I discovered that 2 line feed and a space precede each number. In hex the string is A0, A0, 20, 32, 37, 36, 2E, 30, 30 I have tried clean() and trim() without success? Any suggestions? TIA
Rocky... |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Try...
=RIGHT(A1,LEN(A1)-3)+0 |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thank you! As usual the problem shows more details as solutions are applied. The column is always contains ten characters. The numbers are right justified and padded with A0's. So the solution works for the case given, but fails with more or less digits. The space appears to always be right before the first digit. The LEN(A1) always returns 10 regardless of the number of digits.
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
|
Quote:
In B1 enter: =SUBSTITUTE(A1,RIGHT(A1,SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{".",0,1,2,3,4,5,6,7,8,9},""))))),"") In C1 enter: =SUBSTITUTE(A1,B1,"")+0 where A1 houses an entry you need to clean. Aladin |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|