Brad
Brad

Reputation: 11

Excel issue using datedif function

I have a homework assignment that is to calculate the number of days between dates. It is a simple problem; however the format of the dates in column D are causing issue because of the date function. I am using DATEDIF but I am getting a name error. D is formatted as such =DATE(16,1,6), the E is =TODAY() and the datedif is =DATEDIF(D8,E3,D). Please help. =E3-D8 returns the serial 36548.

Upvotes: 0

Views: 9479

Answers (2)

Ken White
Ken White

Reputation: 125748

You're getting the correct value. The number of days between January 6, 1916 (=DATE(16, 1, 6)) and January 29, 2016 (=TODAY()) is 36,548 days.Your subtraction using =E3-D8 is returning the correct value.

You can do a rough approximation yourself:

 365.25 days per year
x   100 years
=======
36,525 days

Upvotes: 0

Gary's Student
Gary's Student

Reputation: 96791

You should use:

=DATEDIF(D8,E3,"D")

enter image description here

Otherwise the D is not a Defined Name.

Upvotes: 2

Related Questions