←back to thread

280 points 1659447091 | 5 comments | | HN request time: 0s | source
Show context
jasonthorsness ◴[] No.46339351[source]
The descriptions of the problems make it sound a little like algorithmic puzzles but your only tool is Excel instead of some programming language… Excel is pretty amazing in what you can do; I’ve regretted having to use Google Sheets for the last few years.
replies(2): >>46339417 #>>46339574 #
shagie ◴[] No.46339574[source]
> but your only tool is Excel instead of some programming language

There is little difference between (if (> a b) c d) and =IF((A1 > B1), C1, D1)

Excel is the most widely installed functional programming language IDE.

replies(2): >>46339688 #>>46341440 #
OoooooooO ◴[] No.46339688[source]
Change the language of your Windows system to anything but English and then open your Excel file with formulas again.
replies(4): >>46339854 #>>46339904 #>>46343696 #>>46346481 #
mmooss ◴[] No.46339854[source]
ok, what happens? (I'm not messing around on my system right now ...)
replies(1): >>46340289 #
shrx ◴[] No.46340289[source]
Localization of formulas. On my system, all parameter-separating commas have to be replaced with semicolons.
replies(1): >>46341087 #
mmooss ◴[] No.46341087[source]
That is shocking. Excel is used by every international organization, probably. How do they manage the localization?
replies(1): >>46341624 #
1. phinnaeus ◴[] No.46341624[source]
Maybe the files store the formulas in an intermediate format that can be localized by the client
replies(2): >>46342086 #>>46342496 #
2. mmooss ◴[] No.46342086[source]
The GGP says,

> On my system, all parameter-separating commas have to be replaced with semicolons.

That implies the user has to manually change the syntax.

replies(1): >>46342592 #
3. shagie ◴[] No.46342496[source]
That sounds correct. This issue would be when the decimal separator matches the argument separator. In that situation =IF(A1 > 42.1, B1, C1) would be equivalent to =IF(A1 > 42,1; B1; C1)

The possibility of incorrect parsing of equation with a variadic function that contains a decimal number in the equation.

However, this is a localization as even the functions change names.

https://www.reddit.com/r/excel/comments/1flsvyu/separator_co...

    It’s just a locale setting as to which is applied. If you use English (US or UK) then your argument separator will be a comma. If you use other languages, then a semi colon will apply. You’ll find most guidance online referring to English language functions and comma separators, but ultimately it doesn’t really matter. If you ship a spreadsheet to me that you wrote in German functions and syntax that contains:

    =SVERWEIS(X2;A:C;3;0)
    I’ll open that and find

    =VLOOKUP(X2,A:C,3,0)
This suggests client localization that is rendered differently with different language settings.
4. ygra ◴[] No.46342592[source]
The formulae are indeed stored in the same format, regardless of language. For rendering and parsing in the UI they use translated function names and the field separator (commma in English, but semicolon in many other languages because decimal numbers use a comma there).

It does irk me a bit (though not as much as the translated VBA back in the day). But that's probably because I know English, I often look for solutions to my problems in English, not in my native language, and then would have to mentally translate that back. But that's perhaps a burden for programmers more than for typical users.

A few thoughts:

• it's been that way for decades, at this point. So changing it would annoy a lot of users

• the problem with comma and semicolon would remain unless you want entering numbers normally and within a formula to be different. I'm not sure that's good in a product built around numbers (and often numbers that should be written and formatted like any other number in that country).

• making it configurable might work, but that then requires more testing, although sometimes it's not clear how much testing Microsoft is still doing, so that might not be much of a point. But adding options also has UX limits and not just in the length of the settings screen.

replies(1): >>46343314 #
5. demetrius ◴[] No.46343314{3}[source]
LibreOffice Calc has an option to force English function names regardless of the current localization. I guess Excel should have something similar, too¹.

Fun fact: in European and Brazilian Portuguese, the same function names can refer to different things. European SUBSTITUIR² is REPLACE (Brazilian MUDAR), Brazilian SUBSTITUIR³ is SUBSTITUTE (European SUBST).

¹ I've found this solution https://superuser.com/questions/1908516/how-to-change-the-la... but I haven't tested it since I don't have MS Excel at hand to check

² https://support.microsoft.com/pt-pt/office/fun%C3%A7%C3%A3o-...

³ https://support.microsoft.com/pt-br/office/substituir-fun%C3...