SOLVED

Unexpected error while trying to use DATEDIF

%3CLINGO-SUB%20id%3D%22lingo-sub-1873834%22%20slang%3D%22en-US%22%3EUnexpected%20error%20while%20trying%20to%20use%20DATEDIF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1873834%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20use%20the%20DATEDIF%20function%20but%20I%20get%20an%20unexpected%20error.%20I've%20read%20many%20online%20examples%20and%20I'm%20doing%20everything%20correctly.%3C%2FP%3E%3CP%3EI%20type%20%22%3DDATEDIF(%22%2C%20click%20on%20the%20cell%20with%20the%20first%20date%20(thus%20now%20appearing%20%22%3DDATEDIF(H6%22)%20press%20%22%2C%22%20(now%20appearing%20%22%3DDATEDIF(H6%2C%22)%20but%20when%20I%20click%20the%20second%20cell%20to%20insert%20the%20final%20date%2C%20the%20error%20seen%20in%20the%20attached%20picture%20appears!%3C%2FP%3E%3CP%3EEven%20if%20I%20copy%2Fpaste%20those%20online%20examples%20this%20error%20always%20pops%20up.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20using%20Microsoft%20Office%20Professional%20Plus%202016.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat's%20happening%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1873834%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1873873%22%20slang%3D%22en-US%22%3ERe%3A%20Unexpected%20error%20while%20trying%20to%20use%20DATEDIF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1873873%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F864471%22%20target%3D%22_blank%22%3E%40RuiPe1050%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20use%20comma%20as%20decimal%20separator%3F%20If%20so%2C%20you%20should%20use%20semi-colon%20%3B%20to%20separate%20the%20arguments%20of%20a%20function.%20For%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DDATEDIF(H6%3BJ6%3B%22m%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1873871%22%20slang%3D%22en-US%22%3ERe%3A%20Unexpected%20error%20while%20trying%20to%20use%20DATEDIF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1873871%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F864471%22%20target%3D%22_blank%22%3E%40RuiPe1050%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20you%20shall%20use%20semicolons%20instead%20of%20commas%20as%20delimiter%20%3DDATEDIF(H6%3B%20...%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi,

 

I am trying to use the DATEDIF function but I get an unexpected error. I've read many online examples and I'm doing everything correctly.

I type "=DATEDIF(", click on the cell with the first date (thus now appearing "=DATEDIF(H6") press "," (now appearing "=DATEDIF(H6,") but when I click the second cell to insert the final date, the error seen in the attached picture appears!

Even if I copy/paste those online examples this error always pops up.

 

I'm using Microsoft Office Professional Plus 2016.

 

What's happening?

 

Thanks!

6 Replies
Highlighted
Best Response confirmed by RuiPe1050 (New Contributor)
Solution

@RuiPe1050 

Perhaps you shall use semicolons instead of commas as delimiter =DATEDIF(H6; ...

Highlighted

@RuiPe1050 

Do you use comma as decimal separator? If so, you should use semi-colon ; to separate the arguments of a function. For example:

 

=DATEDIF(H6;J6;"m")

Highlighted

@Hans VogelaarNo, I use "." for decimal separator but the ";" worked...

 

Every examples I've seen, including Excel 2016 Help use "," with this function.

 

Rui

Highlighted

@Sergei BaklanThe ";" worked... but all the examples I've seen, including Excel 2016 Help, use "," with this function and I'm not using "," as decimal separator.

 

Thanks!

 

Rui

Highlighted

@RuiPe1050 

Perhaps you have specified ; as list separator in the Region control panel in Windows, or else in Excel in File > Options > Advanced > Editing Options

Highlighted

@RuiPe1050 

You may change locale settings as @Hans Vogelaar suggested and/or use this tool https://en.excel-translator.de/translator/ to translate Excel formulas