Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Problem Nils Titley Excel Programming 8 April 8th 08 11:47 AM
data conversion problem cinnie Excel Discussion (Misc queries) 3 February 23rd 08 10:54 PM
Problem accessing binary data from mysql data base Don Excel Programming 0 June 22nd 07 05:52 PM
Importing Data & Refresh Data Problem George Excel Discussion (Misc queries) 2 March 28th 05 12:37 AM
data problem joao Excel Programming 0 November 10th 03 06:25 PM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"