ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Converting String numbers into real numbers (https://www.excelbanter.com/excel-programming/332930-converting-string-numbers-into-real-numbers.html)

Jean-Jerome Doucet via OfficeKB.com

Converting String numbers into real numbers
 
Hi,

I have a formula in VBA that searches through a table for corresponding
results to the conditions I specified and sort the results into another table.
My problem is that the data I use, which includes monetary values, seems to
have converted them into string numbers (which include de $ sign as part of
the characters and not only into a simple visual effect). It's a problem when
I want to do mathematic operations with those monetary values. Is there a way
to convert them into real numbers in my VBA code just before doing my maths
with them? I tried to pre-format the cells before their extraction but it
seems it isnt enough to really convert them.

Thx!

Werner

--
Message posted via http://www.officekb.com

Tom Ogilvy

Converting String numbers into real numbers
 
Select the cells and do

Edit=Replace
What: $
With: $

If you need a macro, turn on the macro recorder while you do it manually.

--
Regards,
Tom Ogilvy


"Jean-Jérôme Doucet via OfficeKB.com" wrote in message
...
Hi,

I have a formula in VBA that searches through a table for corresponding
results to the conditions I specified and sort the results into another

table.
My problem is that the data I use, which includes monetary values, seems

to
have converted them into string numbers (which include de $ sign as part

of
the characters and not only into a simple visual effect). It's a problem

when
I want to do mathematic operations with those monetary values. Is there a

way
to convert them into real numbers in my VBA code just before doing my

maths
with them? I tried to pre-format the cells before their extraction but it
seems it isnt enough to really convert them.

Thx!

Werner

--
Message posted via http://www.officekb.com




Jean-Jerome Doucet via OfficeKB.com

Converting String numbers into real numbers
 
Thanks for your advice.

JJD

--
Message posted via http://www.officekb.com


All times are GMT +1. The time now is 10:15 AM.

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