ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data problem (https://www.excelbanter.com/excel-programming/409043-data-problem.html)

Singh

Data problem
 
Hi All

For one of my project am getting amount in a different way.
EG: If amount is $45,455.00 am getting data as $ 45'455.00.

Is there any way we can convert this data??

Thanks in advance.


joel

Data problem
 
There arre a few things to try. the number may be just formated using a
custom format. Check the cell format and change the custom format. If the
number is a string the following the steps below.

1) Use replace to remove the single quote
MyNumber = replace(MyNumber,"'","") 'you need to put the single quote
inside double quotes and replace with nothing which is the two double quotes.
2) Remove the dollar sign the same way as the single quote
MyNumber = replace(MyNumber,"$","")
3) Because there is a space between the dollar sign and the number you have
to remove the space. either of the two instructions will work
trim(MyNumber) 'removes spaces from ends of string
val(MyNumber) 'convers string to number
4) If you want to have commas in the number change the format of the cell(s)

"singh" wrote:

Hi All

For one of my project am getting amount in a different way.
EG: If amount is $45,455.00 am getting data as $ 45'455.00.

Is there any way we can convert this data??

Thanks in advance.



All times are GMT +1. The time now is 01:52 AM.

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