Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default challenge coverting to values

Hi all,

i have a situatuion where the data extracted out of systems is as follows.
2.390,06 AUD and $ 1.816,43

Note, the "." is in place of thousands and the "," is in place of a decimal.

How can i convert these text feilds to numbers and exclude the AUD text and
"$" text and also convert the thousands separater to "," and have a decimal
as "."

Thanks
SK


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default challenge coverting to values

Hi Shane,

Manually you can do a series of Edit/Replace's, but remember to use an
intermediate replacement character for your commas (or periods)!

If you do this on a regular basis and want a programming solution try:

Sub Tester9()

With Selection
.Replace What:=".", Replacement:="#", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
.Replace What:="aud", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
.Replace What:="$", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
.Replace What:="#", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
.Value = .Value

End Sub

You can, of course, replace "Selection" with your range name or addresss as
appropriate.

---
Regards,
Norman

"Shane" wrote in message
...
Hi all,

i have a situatuion where the data extracted out of systems is as follows.
2.390,06 AUD and $ 1.816,43

Note, the "." is in place of thousands and the "," is in place of a

decimal.

How can i convert these text feilds to numbers and exclude the AUD text

and
"$" text and also convert the thousands separater to "," and have a

decimal
as "."

Thanks
SK




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
Challenge: Return the rightmost 12 values (rolling 12 months) mr tom Excel Worksheet Functions 2 January 15th 08 01:15 PM
Challenge: Unique Values via Formulas Peter Bernadyne Excel Discussion (Misc queries) 3 March 27th 06 06:18 PM
Coverting seconds into hr:min:sec jsturino Excel Discussion (Misc queries) 3 March 24th 06 08:00 AM
Coverting time Kim Excel Worksheet Functions 1 September 20th 05 01:24 AM
Coverting a VBA array from 2-D to 1-D Dave[_37_] Excel Programming 20 December 15th 03 05:39 AM


All times are GMT +1. The time now is 11:37 AM.

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"