Hi Becky!
If your data is as described D1 is daily, weekly, monthly, or yearly:
=IF(D1="weekly",INT((B1-A1)/7),DATEDIF(A1,B1,LEFT(D1,1)))
This gives the completed number of your chosen time period between A1
and B1. If you want decimal portions as well then post back but the
formulas are bit more difficult especially for months and years where
you don't have a constant.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
Becky said:
OK...The entries are either daily, weekly, monthly, or yearly. If I
add a cell D1 that says what the period is,(daily weekly monthly or
yearly) what would I use to determine the months duration of the
monthly entries? Or can I?