ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Nice and easy - convert text to its numerical equivalent (https://www.excelbanter.com/excel-programming/409378-nice-easy-convert-text-its-numerical-equivalent.html)

Pete Rooney

Nice and easy - convert text to its numerical equivalent
 
Good morning - scanning two worksheets and pasting information via VBA from
one worksheet to another. I copy it from the first worksheet to a variable
thus:

Store_PreAppSpend = Format(WorkOrderToCheckListCell.Offset(0, 31).Formula,
"£#,##0")

I then paste it into the second worksheet like this:

Selection.Offset(0, 7).Formula = Store_PreAppSpend

but it comes in as a label and I want it as a value.

I know I should be able to do this with the worksheet function VALUE, but I
can't remember the syntax I should use.

As usual, thanks in advance.

Regards

Pete





joel

Nice and easy - convert text to its numerical equivalent
 
Some functions in VBA are not the same as the worksheet. Value is one of them.

Try VAL()

"Pete Rooney" wrote:

Good morning - scanning two worksheets and pasting information via VBA from
one worksheet to another. I copy it from the first worksheet to a variable
thus:

Store_PreAppSpend = Format(WorkOrderToCheckListCell.Offset(0, 31).Formula,
"£#,##0")

I then paste it into the second worksheet like this:

Selection.Offset(0, 7).Formula = Store_PreAppSpend

but it comes in as a label and I want it as a value.

I know I should be able to do this with the worksheet function VALUE, but I
can't remember the syntax I should use.

As usual, thanks in advance.

Regards

Pete






All times are GMT +1. The time now is 05:12 PM.

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