Date formatting interferes with formulas

dotsent

Board Regular
Joined
Feb 28, 2016
Messages
89
Office Version
  1. 365
Platform
  1. Windows
Hi! I created an Excel tool that utilizes basic DATE to TEXT formula to get a certain output format:
Excel Formula:
TEXT(TODAY(),"yyyymmdd")

I had to hand the tool over, but it doesn't work in the other PC anymore (some bogus output). Both are Win10 + Office365. Main difference - while my PC regional settings are Estonian, the other PC has Finnish setup. All the regional settings are in either EST or FIN, though both computers run Excel in English.

The way this formula runs in another PC is adjusting formula to:
Excel Formula:
TEXT(TODAY(),"vvvvkkpp")

This is the same formula, however in Finnish (v = year, k = month, p = day). With that being said, "yyyymmdd" clearly is NOT Estonian either, but it works regardless. I don't want to change the formula into Finnish format as it wouldn't run on my PC anymore. Is there a way to overcome this without destroying either PC-s regional settings? I think backup plan is switch all date manipulation to VBA Format function, but perhaps there's an easier way to retain the formulas? Must admit, was quite surprised to see regional settings shift formula syntax like that...

Any chance to run the same original formula with a different Windows regional setup?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Finland vs Estonia
when i thought about it, that wasn't your question.
You want to show with 1 formula the same day
Finland_Estonia.xlsm
A
1120220415
12vrijdag 15 april 2022
Blad2
Cell Formulas
RangeFormula
A11A11=TEXT(TODAY(),DateLocal_YYYYMMDD)
A12A12=TEXT(TODAY(),DateLocal_long)


the 2 defined names for the long or the yyyymmdd dateformat are
english =IF(ISNUMBER(TEXT(TODAY(),"YYYY")),"dddd dd mmmm yyyy",IF(ISNUMBER(TEXT(TODAY(),"vvvv")),"pppp pp kkkk vvvv","dddd dd mmmm jjjj"))
Finnish =JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"YYYY"));"dddd dd mmmm yyyy";JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"vvvv"));"pppp pp kkkk vvvv";"dddd dd mmmm jjjj"))

english =IF(ISNUMBER(TEXT(TODAY();"YYYY"));"yyyymmss";IF(ISNUMBER(TEXT(TODAY();"vvvv"));"vvvvkkpp";"jjjjmmdd"))
Finnish =JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"YYYY"));"yyyymmss";JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"vvvv"));"vvvvkkpp";"jjjjmmdd"))
 
Last edited:
Upvote 0
you need to know the language code
for example Specifying a Language for the TEXT Function
Map2
CD
29Finlandpe 15/huhtikuu/2022
30EstoniaR 15/aprill/2022
Blad1
Cell Formulas
RangeFormula
D29D29=TEXT(TODAY(),"[$-040B]ddd dd/mmmm/jjjj")
D30D30=TEXT(TODAY(),"[$-0425]ddd dd/mmmm/jjjj")

Hi BSALV and thanks for taking the time to respond. The link was an interesting read, but you are right - I'm not looking to change the output format of the formula, but rather have a formula that would work, regardless if the local regional settings are EST or FIN. So it's an input problem, not output.
 
Upvote 0
Finland vs Estonia
when i thought about it, that wasn't your question.
You want to show with 1 formula the same day
Finland_Estonia.xlsm
A
1120220415
12vrijdag 15 april 2022
Blad2
Cell Formulas
RangeFormula
A11A11=TEXT(TODAY(),DateLocal_YYYYMMDD)
A12A12=TEXT(TODAY(),DateLocal_long)


the 2 defined names for the long or the yyyymmdd dateformat are
english =IF(ISNUMBER(TEXT(TODAY(),"YYYY")),"dddd dd mmmm yyyy",IF(ISNUMBER(TEXT(TODAY(),"vvvv")),"pppp pp kkkk vvvv","dddd dd mmmm jjjj"))
Finnish =JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"YYYY"));"dddd dd mmmm yyyy";JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"vvvv"));"pppp pp kkkk vvvv";"dddd dd mmmm jjjj"))

english =IF(ISNUMBER(TEXT(TODAY();"YYYY"));"yyyymmss";IF(ISNUMBER(TEXT(TODAY();"vvvv"));"vvvvkkpp";"jjjjmmdd"))
Finnish =JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"YYYY"));"yyyymmss";JOS(ONLUKU(TEKSTI(TÄMÄ.PÄIVÄ();"vvvv"));"vvvvkkpp";"jjjjmmdd"))

Thanks again. I promised myself "not to go for some IFS-nonsense" and implement VBA in that case but I try to wrap my head around it first. It's Office365, so I can use IFS-function as well, but are we testing if one input format ("yyyymmdd") gives an error and if it does, we use another input ("vvvvkkpp")? It wasn't an error response (#N/A), but something clearly wrongly formatted.

What is interesting though - while there seem to exist translations for native formula functions in Finnish, the PC worked with English formulas, so the function name itself didn't look to be a problem - just the date format.

Also, when formatting cells - custom formatting didn't suggest English d/m/y combinations, but it was in Finnish (p/k/v).
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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