On Wed, 26 Oct 2005 06:19:52 -0500, TAS-LGS
wrote:
I want to enter regular entries in a spread sheet (of meter readings to
track utility cost) and in one column I want to determine the cost per
day. I therefore enter the date in column A (set as "Date" field),
followed by such items as meter reading, unit rate, etc. In one column
I want to subtract for example last reading date from prior reading
date; this value to divide the total period cost to determine the daily
cost.
It seems that there is no way I can get a result using DATEDIF, even
copying any samples expressed by various bulletin boards.
In desperation I have used the manual method of converting the date
value to it's numerical component and doing a simple subtraction to get
the desired result.
Surely, DATEDIF should allow me to leave the (date) field in date
format so that one can readily see the real date without having to do a
further conversion.
Am I expecting too much, or missing something?
Thanks for reading this and providing help.
TAS-LGS
You're missing something, but hard to tell what since you don't post your
formulas nor the results of what you tried.
However, if you require a result in days, there is no need to use DATEDIF.
Excel stores dates as serial numbers starting with 1/1/1900 (or 1904) so you
merely need to subtract =current_date - previous_date. Be sure to format the
result as General or as Number.
If you get a VALUE error, then one or both of your dates are TEXT and not
dates.
--ron