View Single Post
  #6   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Use VBA functions in a worksheet?

Sounds like you need DateDif. It isn't documented by MS for some reason, but
Chip Pearson has a page on it at http://www.cpearson.com/excel/datedif.htm

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jeff" wrote in message
...
mmm, that won't work. I was trying to calculate the age of a list of

people given their date of
birth. I ended up using some year, month, and day functions.

Assuming the date of birth is in column A, this should calculate the

correct age to the day

=(YEAR(TODAY()) - YEAR(A1)) - ((MONTH(TODAY())*100 + DAY(TODAY())) <

(MONTH(A1)*100 + DAY(A1)))

If anyone knows a better way to do this please post it. I just wanted a

formula I could drag down a
list of birth dates without writing a VBA procedure.

Jeff


"Robin Hammond" wrote in message
...
Jeff,

You don't need it. Try this as a formula:

=NOW()+1

Robin Hammond
www.enhanceddatasystems.com

"Jeff" wrote in message
...
Is it possible to use VBA functions in a worksheet? I'd like to use

the
Dateadd() function on a
worksheet.

Jeff