datedif

L

LWhite

Hello,

I am working on Excel 2003 in an XP sp2 environment.

I have a date in cell C7 and C6. I want to get the
difference between them to use to pro-rate vacation time
accrued.

I have the Norman Harker Function list and was trying to
use datedif. It has the function listed as

=DATEDIF(start_date,end_date,unit)

with units as

"y" = years; "m" = months; "d" = days; "md" = days
ignoring months and years; "ym" = complete months after
deducting years; "yd" = days after deducting complete
years. (Note: " " are required).

I tried this as

=DATEDIF($C$7,$C$6,"d")
=DATEDIF(C7,C6,"d")
=DATEDIF(DATE(YEAR(C7),MONTH(C7),DAY(C7)),DATE(YEAR
(C6),MONTH(C6),DAY(C6)),"d")

I still receive #NUM! as the answer. Does anyone know why?

LWhite
 
J

JE McGimpsey

Probably because your date in C7 is earlier than your date in C6. The
start_date has to be earlier than the end_date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top