Thanks:  0
Likes:  0

# Thread: How to TRIM() unruly characters?

1. 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. Try...

=RIGHT(A1,LEN(A1)-3)+0

3. 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. On 2002-02-21 19:48, Anonymous wrote:
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.
I wonder whether what follows would work for you:

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.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•