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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

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