Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Opinicus[_2_] Opinicus[_2_] is offline
external usenet poster
 
Posts: 97
Default change decimal dots per coma (in word)

On Mon, 3 May 2010 15:23:01 -0700, Gabriela
wrote:

Having a table with numbers in word, how can I change decimal dots per coma?


In addition to what Doug said I should add something else because I
frequently have this problem too. I often have a lot of numbers in
tables with the "European" format like this:

321.576,98

That is, "." separates the thousands and "," separates the decimal
fraction. I need to change these numbers to "English" format like
this:

321,576.98

The way to do this is first find and replace all of the "." to another
character that doesn't exist in the table, say "|". Next find and
replace all of the "," to ".". Finally find and replace all of the "|"
to ",".

The following is a macro that I've been using to do this for many
years:

begin macro
Sub ToggleCommasAndPeriods()
'
' ChangeFormatOfSelectedNumber Macro
' Macro created 24-Mar-05 by Greg Maxey
'
Dim myRange As Range
If Selection.Type = wdSelectionIP Then
MsgBox "Select text before running this macro.", , "Nothing
Selected"
End
End If
Set myRange = Selection.Range
myRange = Replace(myRange, ".", "..")
myRange = Replace(myRange, ",", ",,")
myRange = Replace(myRange, ",,", ".")
myRange = Replace(myRange, "..", ",")
With myRange
If Left(.Text, 1) = "-" Then
.Text = "(" & Replace(.Text, "-", "") & ") "
End If
End With
End Sub
/end macro

I can't comment on it at all except to say that it works as
advertised.

HTH

--
Bob
http://www.kanyak.com
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add coma Ben Shirida Mailmerge 1 June 9th 08 10:54 AM
How do you change decimal alignment in tables? RayW Tables 1 October 19th 07 04:56 PM
MERGE NUMBERS WITH COMA FORMATTING hotty Mailmerge 1 December 30th 05 01:41 PM
Change a decimal point (.) by coma (,) Thomas Mailmerge 4 February 17th 05 01:59 PM
Date format changed and decimal places change in Word 2003 mail me Michelle Mailmerge 1 February 9th 05 11:47 PM


All times are GMT +1. The time now is 07:32 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"