Number format

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,520
Office Version
  1. 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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
13,766
Office Version
  1. 365
Platform
  1. Windows
Different regional settings?
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
13,766
Office Version
  1. 365
Platform
  1. Windows
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.
 

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,520
Office Version
  1. 2019
Platform
  1. Windows

ADVERTISEMENT

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.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
13,766
Office Version
  1. 365
Platform
  1. Windows
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.
 

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,520
Office Version
  1. 2019
Platform
  1. Windows
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!
 

Forum statistics

Threads
1,143,637
Messages
5,719,972
Members
422,253
Latest member
frankie2016tata

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
Top