Format decimal comma and point

zovche

Board Regular
Joined
Mar 21, 2013
Messages
125
Hi, my local settings for numbers are decimal comma (,) and point (.) for thousand separator.

I have one workbook now where I need to use decimal point instead, without thousand separator. But I don't want to change my regional setting nor Excel settings (File -> Options -> Advanced) because that way that option stays for any other excel which I don't want.

Can I somehow define formats just for this specific workbook and nothing else, or for specific cells with formula or VBA?

Thank you.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Can't you just highlight the whole section you want to apply this to (whole sheet, specific columns, etc), and just go to the Format menu and change the format to what you want (no VBA required!)?
 
Upvote 0
if you mean on format cells and choosing custom, it's not working maybe I'm doing it wrong, but if I have number 34,05 and I custom it and type #.## it converts number into 34050 without decimals, as it recognize it as thousand separator. Maybe there's some trick, but as soon I write dot it understands it as kilo. But like I said maybe i'm just not familiar with a trick that would do it so
 
Upvote 0
if you mean on format cells and choosing custom, it's not working maybe I'm doing it wrong, but if I have number 34,05 and I custom it and type #.## it converts number into 34050 without decimals, as it recognize it as thousand separator. Maybe there's some trick, but as soon I write dot it understands it as kilo. But like I said maybe i'm just not familiar with a trick that would do it so


Maybe then what you want to do is divide the new result by 1000?
 
Upvote 0
Maybe then what you want to do is divide the new result by 1000?

Hm, thank you for suggestion, but data is from external sources so I would have to multiply it in SQL line, and still not sure if it would take dot as a decimal point at the end. So far I did following:
I have macro to generate XML at the end of story, and for that XML I need decimal dots. So Before creating XML via macro I put

Code:
    Application.DecimalSeparator = "."
    Application.ThousandsSeparator = ""
    Application.UseSystemSeparators = False

and at the end of macro I returned

Code:
    Application.DecimalSeparator = ","
    Application.ThousandsSeparator = "."
    Application.UseSystemSeparators = True


So in single click it will do the trick, will save XML with dots as decimal and return back to regular settings, however it's pretty shame not to be able to change number format in any other way then changing Operating System Regional settings.
 
Upvote 0
34,0535340.0534.05
pos of ","No of charsleft of commaright of comma / 100
or find "," replace with "."

<colgroup><col span="4"><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,788
Members
449,049
Latest member
greyangel23

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