How do I do this ?I need help with problem


Posted by aaron on April 28, 2001 10:10 PM

For fun,my Excel teacher at my local Junior college told us over the weekend to figure out how old we are.He said it would be in thousands of days.We are learning about the functions that Excel has such as NOW,TODAy,DATE And Date math.

Does anyone know how in Excel you figure out how many days between your birhday etc? What is the correct way to do this?
Thanks for the help!

Posted by Try this on April 28, 2001 10:13 PM

http://www.cpearson.com/excel/datedif.htm#Age



Posted by Mark W. on April 29, 2001 2:04 PM

Aaron, since Excel's stores date values as integers
really all you have to do is subtract your birthdate
from the TODAY() function. Let's say you were born
on 5/4/1982. Then =TODAY()-"5/4/1982" will provide
your age in days. You'll need to format the cell
containing this formula as General. Excel presumes
that when you use a date value or reference to a date
value in your formula that it should be Date formatted.
Obviously, in this case it shouldn't.

You may have noticed that I subtracted a text string from
the TODAY() function and produced a value. You can
amaze your teach and fellow students by matter-of-factly
stating, "Oh yeah, that's just an example of Excel's data
type coercion." : ) Enjoy your class.