Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Datedif formula

Status
Not open for further replies.

strom99

MIS
Nov 28, 2000
126
US
I have the following formula

=IF(D2="ACTIVE",DATEDIF(Z2,P2,"D"))

Checks to see whether project is Active and then determines number of days it has been active.

Cell Z2 contains =Today()
Cell P2 contains Project Start Date

I am getting the following error message: #NUM!

Any ideas? Thanks!
[wavey]
 
change it to;

=IF(D2="ACTIVE",DATEDIF(P2,Z2,"d"))

Cheers,

Wray
 
You don't say whether your project start date is earlier or later than today. Datedif relies on the date in Z2 being before the date in P2, and depending on which way you look at it, you will either get a correct number, or you will get #NUM as you are.

My money is on your dates being the wrong way round for this function.

Regards
Ken...............
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top