Senin, 29 Mei 2017

Re: [ExcelVBA] Find Replace of spaces

 



Hi Paul
 
Random thoughts/guesses.
 
See what =Value(cell) does.  It might look past the white space and extract the number.
 
The spaces you're seeing are presumably not normal spaces.  Could be non-breaking spaces (e.g. from Word) or tabs.  You might be able to find out which by doing an "inspect element" in the web browser.
 
There is a Code() function that returns the ASCII code of the first character from a cell (or the string returned by a Mid() function).  This will let you see what it is (although it won't help you eliminate it).
 
You might be able to F2 a cell and then grab the blank character with Ctrl-C and then Ctrl-V it into the find part of a find/replace.  Backup carefully first, of course, in case it replaces too much.  :-)
 
If none of these work, you might like to upload the file or send it to me and I'll have a look at it.

Regards, Dave S
 
----- Original Message -----
Sent: Tuesday, May 30, 2017 3:29 PM
Subject: [ExcelVBA] Find Replace of spaces

Hi all


I am struggling with a table imported into Excel from a web page.

It correctly formats as a table in terms of columns, but the numbers all have the format of [SPACE]122.500[SPACE], General formatting.


Find and replace of [SPACE] with nothing gives an error message.

Interestingly, =SUBSTITUTE(C1," ","") does not give an error message, but does not remove the spaces. If I test it by multiplying the result with 1, I get a #VALUE error, and the spaces are visually still there.


I can't test for TAB, as it has special functions in Excel. Try using it in a formula!


Any ideas?


Regards



Paul

__._,_.___

Posted by: "David Smart" <smartware.consulting@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------

.

__,_._,___

Tidak ada komentar:

Posting Komentar