ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   weird! Excel refuses to compute numbers... (https://www.excelbanter.com/excel-discussion-misc-queries/211484-weird-excel-refuses-compute-numbers.html)

LunaMoon

weird! Excel refuses to compute numbers...
 
Hi all,

I copied and pasted the HTML table into Excel.

http://finance.google.com/finance?fs...&q=NASDAQ:FMCN

And when I do "=B11/B10" in Excel,

it complains "#Value!"

I have checked that B11 and B10 are numbers, but why haven't they been
treated as numbers?

And I've tried manipulating other numbers in the sheet (or at least
they are numbers but in a text format, I guess), they all fail ...

Dave Peterson

weird! Excel refuses to compute numbers...
 
Lots of times, when you copy|paste from a web site, you'll get those HTML
non-breaking spaces (char(160)).

You can clean them up with formulas, but if you have to do it lots of times (or
with lots of data), you may want to use a macro.

David McRitchie has a macro that can help clean this:
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()")

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

LunaMoon wrote:

Hi all,

I copied and pasted the HTML table into Excel.

http://finance.google.com/finance?fs...&q=NASDAQ:FMCN

And when I do "=B11/B10" in Excel,

it complains "#Value!"

I have checked that B11 and B10 are numbers, but why haven't they been
treated as numbers?

And I've tried manipulating other numbers in the sheet (or at least
they are numbers but in a text format, I guess), they all fail ...


--

Dave Peterson

Pete_UK

weird! Excel refuses to compute numbers...
 
If you have pasted a table from an HTML source then you probably have
non-breaking spaces (character code 160) in among the data. Highlight
all the data and CTRL-H (Find & Replace):

Find What: ALT-0160
Replace With: leave blank
Click Replace All

where ALT-0160 means hold the ALT key down while you type 0160 on the
numeric keypad.

Hope this helps.

Pete

On Nov 25, 1:15*am, LunaMoon wrote:
Hi all,

I copied and pasted the HTML table into Excel.

http://finance.google.com/finance?fs...&q=NASDAQ:FMCN

And when I do "=B11/B10" in Excel,

it complains "#Value!"

I have checked that B11 and B10 are numbers, but why haven't they been
treated as numbers?

And I've tried manipulating other numbers in the sheet (or at least
they are numbers but in a text format, I guess), they all fail ...



LunaMoon

weird! Excel refuses to compute numbers...
 
Thanks a lot folks. Worked like a charm!

Pete_UK

weird! Excel refuses to compute numbers...
 
You're welcome - thanks for feeding back.

Pete

On Nov 25, 1:43*am, LunaMoon wrote:
Thanks a lot folks. Worked like a charm!




All times are GMT +1. The time now is 09:01 PM.

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