DatedIf Not Working

Copper Contributor

I'm trying to calculate the shelf life remaining on an item using the manufactured date & the expiration date. Using the DatedIf function I am attempting to formulate the following: =datedif(mfg_date,expir_date,"m")- this is per every forum I've found. Now when I start to enter the formula, I only get as far as =datedif(mfg_date, before I get an error message. Once I put that comma & click the second cell, the error message occurs. The two date cells are utilizing short date formating so I know that's not the issue here. 

 

Any help would be appreciated! Screenshots are attached

14 Replies

@cdersarkisian 

Perhaps you shall use semicolon instead of comma as delimiter, depends on your locale.

@cdersarkisian 

 

Here's another screen shot that shows the formula works.

 

So I'm wondering if one or both of those dates just appear to dates properly formatted, but are actually text

 

mathetes_0-1610997512345.png

 

I'm in the U.S but I did try that- didn't work! @Sergei Baklan 

I formatted them as dates using the cell formatting function so they are definitely dates

@cdersarkisian 

 

Can you then, since none of our suggestions have helped yet, post a copy of the actual spreadsheet?

@mathetes  sure- i just added a copy

@cdersarkisian 

On your file formula is without error

image.png

That's bizarre, it's still not working for me.

@cdersarkisian 

If you open the file attached to my post do you have any errors?

@cdersarkisian I’m on my iPad and it reads the formula fine however I think it’s the “y” that is not working or any of its variants however I have no grounds backing that theory whatsoever so I really need someone’s help please, I really need this function to work for me lol

I found a solution :) =((DAYS(TODAY(),E2))/365.25) and then reduced to 1 decimal which actually works great for me, maybe not for others though, hope this helps someone :)

@JHarFood , is it differ from =YEARFRAC(E2,TODAY(),1) ?

@cdersarkisian 

 

=([end_date]-[start_date])/365.25   (or 30.4375, etc.) 

 

 works well enough for most purposes

@cdersarkisian use ; instead of ,