>>Hello,
>>
>>How do you convert a string in an Excel cel to either a number to do artihmetic or a formula to evaluate.
>>
>>Examples:
>>String in cell: " 5.00" Want to convert to number 5.00
>>String in cell: "=SUBTOTAL(9,J4:J10)" Want to convert to formula =SUBTOTAL(9,J4:J10)
>>
>>I've tried Excel copy / paste special with no success.
>>
>>TIA,
>>
>>Alex
>
>Did you try setting NumberFormat for your first problem? And setting formula for the second?
>
>
Re: Excel Automation Formatting and F9 Thread #
1372023 Message #
1372036Thank you very much for the response Naomi.
I think your example inserts cells individually. I am trying to save time with a suggestion by Cetin that uses ADODB. The result is that the strings are copied to Excel and the issue becomes how to convert them to numbers or formulas using Excel.
NumberFormat does not work. The only way I found to convert to numbers is Copy / Paste Special with "Operation Add" to an empty worksheet and then copy back. Excel converts before adding.
That leaves formula conversion as a mystery.
Alex