When I copy and paste an html table of numbers taken from a web based stock report, I cannot add formulae into adjacent cells to calculate additional data as I get a 'value' error. How can I make this work?
-
-
Answer:
I think iwnit probably has the right answer, but to take it one step further, just "changing format" (by selecting the cells and "making them" the new numeric format that you want) won't fix the problem by itself, because the numbers will still have been entered as text, so they will still BE text until they are manually changed -- or that is done by macro. You have to re-examine each of the values individually and force Excel to re-read them as "numbers", which it isn't doing right now. You could have a macro do that for you: Create the following Module in the VBA editor (more on that later if you don't understand how to do that): Sub FixNumberFormat() ' Convert text-entered number to number format, or ' vice versa Dim cell As Range For Each cell In Selection cell.Value = cell.Value cell.NumberFormat = cell.NumberFormat Next cell End Sub If you don't know how to create a new module, then do this: 1. Make your workbook the active window. That is, be sure that you're working there. 2. From the menu select Tools / Macro / Macros and in the 'Macro' window that comes up type in the name "FixNumberFormat" (no spaces in the name) and click Create. 3. Paste the macro text above into the window that appears. (This is the VBA -- Visual Basic for Applications -- Editor.) Your macro must begin with "Sub [MacroName] ()" and finish with "End Sub", so you can overwrite the 'begin' and 'end' tags in the macro window with the text above. 4. Navigate back to your worksheet containing the values to be re-evaluated / changed to numbers. Make sure that you have already modified the format of the cells to Number in the normal way. 5. Select the cells to be re-evaluated and then do Tools / Macro / Macros. Click on the FixNumberFormat macro and "Run". 6. The numbers should now be re-read and evaluated as numbers, and not text. All this macro is doing is exactly what you would be doing yourself by re-examining each cell, one by one, and hitting F2 and Enter (with no other change). But the macro does it faster than you could possibly do it. And with less chance for error, too.
Huffysfavtj at Answerbag.com Visit the source
Other answers
It could be that the values have been imported in the "text" format. Try to change the format to "number".
iwnit
Related Q & A:
- Can you help me learn how to copy and paste an html link to my website?Best solution by Yahoo! Answers
- How do I copy and paste a link?Best solution by Yahoo! Answers
- How do I create a web based msn?Best solution by Yahoo! Answers
- How can I stop a player in chess from freezing my game when I am winning in the middle or at the end of a game?Best solution by chess.com
- How can I copy and paste a prestige-portrait photo from the internet??Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.