Number format

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,832
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Can someone please explain why the following "looks correct" on my version of Excel 2019:

Code:
Selection.NumberFormat = _
        "_-[$€-x-euro2] * #,##0.00_-;-[$€-x-euro2] * #,##0.00_-;_-[$€-x-euro2] * ""-""??_-;_-@_-"

but doesn't on others?

I see the euro sign but others see a vertical line for the currency.

Instead, they have to write this:

Code:
Selection.NumberFormat = _
        "_([$ˆ-x-euro2] * #,##0.00_);_([$ˆ-x-euro2] * (#,##0.00);_([$ˆ-x-euro2] * ""-""??_);_(@_)"

Thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
It would be your operating system settings, not an excel setting. Assuming windows 10, click the windows start button then go to windows system > control panel > region.

Different regional settings usually means different country. If a user's first language is not that of the country that they are in then it is possible that they have changed some settings so that things are in the language that they are more comfortable using.
 
Upvote 0
It would be your operating system settings, not an excel setting. Assuming windows 10, click the windows start button then go to windows system > control panel > region.

Different regional settings usually means different country. If a user's first language is not that of the country that they are in then it is possible that they have changed some settings so that things are in the language that they are more comfortable using.
Thanks, will try that.
 
Upvote 0
If it's of any use, I just found a bit of info that you can use to identify the region from vba
VBA Code:
MsgBox Application.International(xlCountrySetting)
will give you a number (international dialing code) based on the location in the system settings. 44 for UK, 1 for USA, etc.

If they are different then you could use that with If or Select Case to identify the region and apply the correct format.
 
Upvote 0
If it's of any use, I just found a bit of info that you can use to identify the region from vba
VBA Code:
MsgBox Application.International(xlCountrySetting)
will give you a number (international dialing code) based on the location in the system settings. 44 for UK, 1 for USA, etc.

If they are different then you could use that with If or Select Case to identify the region and apply the correct format.
That's great, think it will be really helpful.

All I need now is to get access to my user's computer!
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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