Hi,
I have an Excel spreadsheet in the column are expected values only.
There is however the possibility that the macro is interrupted due to a single value text.
Which solution is indicated I enter a:
Code:On Error Resume Next
Hi,
I have an Excel spreadsheet in the column are expected values only.
There is however the possibility that the macro is interrupted due to a single value text.
Which solution is indicated I enter a:
Code:On Error Resume Next
Straightening out your data so that non-numeric text values do not appear in Column C would be the best course of action but, assuming that is not possible for some reason, then I would go with the On Error method instead of the Val method only because the text values are retained and should stand out (they will be left-justified in the cell) in and among the numerical output (which is right-justified)... the Val method would produce incorrect numerical results for the text and be hard to spot given normal looking numbers would be output with it. One thing to note with either method... the value in the cell located in the row above the text cell's output will be incorrect.
Last edited by Rick Rothstein; 10-26-2012 at 11:57 PM.
Bookmarks