• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro for removing end space on each cell

Vijayonline2008

New Member
I'am attaching here a small portion which I'am working on. Since it is copied from an HTML file it has a space at the end of each value on the cell.

Is there any macro to remove the space as I'am not able to do any multiplication or subtraction as the value is not treated as numeric.
 

Attachments

  • Value.xlsx
    8.7 KB · Views: 6
Select all cells. Goto Find and Replace dialog box by press Ctrl+H.
Type a spacebar in the Find what box and press Alt+A to remove all the spaces.

with best regards

Arun N
 
@narunfca
OP's string contains not space. But a non-breaking-space character (CHAR(160)), which is extensively used in the web.

To replace it use UDF mentioned above, or you can replace CHAR(160) with "".
Something like...
=SUBSTITUTE(A2,CHAR(160),"")+0

Edit: Or type =CHAR(160) in out of way cell. Press F9 and copy without leaving the cell. Use CTRL + F, and look in values and replace.
 
Back
Top