When Copy/Paste Web content (containing numbers) in to excel, can't use copied numbers for calculation!

VraGolan

New Member
Joined
Apr 23, 2019
Messages
4
When I copy and paste text from a web page in to excel, the numbers in the cells are not recognized as numbers and therefore no calculation is possible (#VALUE error) by using this numbers.
I have tried solutions like changing cell format, Paste Special multiply or add 0, Value() Function, Text to Columns etc. but non of them is working.
The only formula that could transform this text in to numbers was =0+SUBSTITUTE(A1,CHAR(160),"").
The problem with this was that the converted numbers were not working in more complicated formulas.
Is there any other (simple & not formula based) way to transform this text to simple numbers that can be used for simple calculations???


My example below:

  • First I copy paste text from web page in this format
[TABLE="class: s1w8oh2o-19 fLUOnB"]
<tbody>[TR="class: s1w8oh2o-20 lglzjB"]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"][/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]A[/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"][/TH]
[/TR]
[TR="class: s1w8oh2o-20 lglzjB"]
[TD="class: s1w8oh2o-21 dIcMCi"]1[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]1:3[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"][/TD]
[/TR]
</tbody>[/TABLE]
2. I use the "Text to column" function to get each number in separate cell.


[TABLE="class: s1w8oh2o-19 fLUOnB"]
<tbody>[TR="class: s1w8oh2o-20 lglzjB"]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"][/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]A[/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]B[/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]C[/TH]
[/TR]
[TR="class: s1w8oh2o-20 lglzjB"]
[TD="class: s1w8oh2o-21 dIcMCi"]1[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]1:3[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]1[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]3[/TD]
[/TR]
</tbody>[/TABLE]
3. I use this formula =0+SUBSTITUTE(A1,CHAR(160),"") to transform the text to numbers.


[TABLE="class: s1w8oh2o-19 fLUOnB"]
<tbody>[TR="class: s1w8oh2o-20 lglzjB"]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"][/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]A[/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]B[/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]C[/TH]
[TH="class: s1w8oh2o-25 ieLkgp, align: center"]D[/TH]
[/TR]
[TR="class: s1w8oh2o-20 lglzjB"]
[TD="class: s1w8oh2o-21 dIcMCi"]1[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]1:3[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]1[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]3[/TD]
[TD="class: s1w8oh2o-21 dIcMCi"]=0+SUBSTITUTE(A1,CHAR(160),"")[/TD]
[/TR]
</tbody>[/TABLE]


Thank you for all suggestions and help !!!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
If the substitute formula doesnt error than that is producing a real number. There is no reason that number should not work in more complicated formulas.
 
Upvote 0
or try to use VALUE function
But Steve the fish is right - if you don't get an error in column D then it is a number (in this case 0.333333(3) )
But if the numbers in B and C don't work - use Value() for them.
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top