Change decimal separator format in a wokbook

poseido

New Member
Joined
Sep 1, 2011
Messages
2
Hello!

I'd like one of my workbooks to have a different decimal separator than usual.
my system (spanis) uses "," as decimal separator, and "." as thousand separator.

I'd like one of my workbooks to use the oposite, (the usual english format, ".2 as decimal and "," as thousands; but only this workbook, I do nto want to change the systems default, or the Excel default.

is it possible trougt config or macros?

Many thanks in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hello!

I'd like one of my workbooks to have a different decimal separator than usual.
my system (spanis) uses "," as decimal separator, and "." as thousand separator.

I'd like one of my workbooks to use the oposite, (the usual english format, ".2 as decimal and "," as thousands; but only this workbook, I do nto want to change the systems default, or the Excel default.

is it possible trougt config or macros?

Many thanks in advance

Maybe something like these event codes:

In Thisworkbook Open module:

Code:
    With Application
         .UseSystemSeparators = False
         .DecimalSeparator = "."
        .ThousandsSeparator = ","      
    End With

WorkbookBeforeClose
Code:
    With Application
        .UseSystemSeparators = True        
    End With
 
Upvote 0
Maybe something like these event codes:

In Thisworkbook Open module:

Code:
    With Application
         .UseSystemSeparators = False
         .DecimalSeparator = "."
        .ThousandsSeparator = ","      
    End With

WorkbookBeforeClose
Code:
    With Application
        .UseSystemSeparators = True        
    End With

Thanks!
It worked!
 
Upvote 0

Forum statistics

Threads
1,215,586
Messages
6,125,683
Members
449,249
Latest member
ExcelMA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top