Home |
Search |
Today's Posts |
#1
|
|||
|
|||
I want word to work out a persons age!
I know you can do this in Excel using the 'datedif' function, but is it
possible to get the same result in word, using a table?? I have a form in word where you have to enter a date of birth, and I'm sure it must be possible to get word to give you an age based on that date, rather than having to type it in... Any help appreciated.. Thanks very much Zed |
#2
|
|||
|
|||
G'Day Zed,
I already wish I hadn't answered this. 1. The DATEDIF function is peculiar to Excel. VBA (and Word) have the DateDiff() Function. It is NOT easy to use Datedif() to calculate an age. We humans use a form of 'compound arithmetic' that DateDiff() does not - it directly gives an age in DAYS. To turn this into 'Human' Years, Months, Days is a pain! See (Function Age (...) bottom of Page): http://www.cpearson.com/excel/datedif.htm 2. In Word IT IS MUCH WORSE! You can not call VBA Functions directly as you can in Excel. See (for a reasonable fudge): http://wordtips.vitalnews.com/Pages/...th_Fields.html -- Regards, Pat Garard Melbourne, Australia _______________________ "Zed" wrote in message ... I know you can do this in Excel using the 'datedif' function, but is it possible to get the same result in word, using a table?? I have a form in word where you have to enter a date of birth, and I'm sure it must be possible to get word to give you an age based on that date, rather than having to type it in... Any help appreciated.. Thanks very much Zed |
#3
|
|||
|
|||
Thanks Pat, it does seem a very complex way of doing it.. may be just easier
to type in the age!! "Pat Garard" wrote: G'Day Zed, I already wish I hadn't answered this. 1. The DATEDIF function is peculiar to Excel. VBA (and Word) have the DateDiff() Function. It is NOT easy to use Datedif() to calculate an age. We humans use a form of 'compound arithmetic' that DateDiff() does not - it directly gives an age in DAYS. To turn this into 'Human' Years, Months, Days is a pain! See (Function Age (...) bottom of Page): http://www.cpearson.com/excel/datedif.htm 2. In Word IT IS MUCH WORSE! You can not call VBA Functions directly as you can in Excel. See (for a reasonable fudge): http://wordtips.vitalnews.com/Pages/...th_Fields.html -- Regards, Pat Garard Melbourne, Australia _______________________ "Zed" wrote in message ... I know you can do this in Excel using the 'datedif' function, but is it possible to get the same result in word, using a table?? I have a form in word where you have to enter a date of birth, and I'm sure it must be possible to get word to give you an age based on that date, rather than having to type it in... Any help appreciated.. Thanks very much Zed |
#4
|
|||
|
|||
It usually is. ;-)
-- JoAnn Paules MVP Microsoft [Publisher] "Zed" wrote in message ... Thanks Pat, it does seem a very complex way of doing it.. may be just easier to type in the age!! "Pat Garard" wrote: G'Day Zed, I already wish I hadn't answered this. 1. The DATEDIF function is peculiar to Excel. VBA (and Word) have the DateDiff() Function. It is NOT easy to use Datedif() to calculate an age. We humans use a form of 'compound arithmetic' that DateDiff() does not - it directly gives an age in DAYS. To turn this into 'Human' Years, Months, Days is a pain! See (Function Age (...) bottom of Page): http://www.cpearson.com/excel/datedif.htm 2. In Word IT IS MUCH WORSE! You can not call VBA Functions directly as you can in Excel. See (for a reasonable fudge): http://wordtips.vitalnews.com/Pages/...th_Fields.html -- Regards, Pat Garard Melbourne, Australia _______________________ "Zed" wrote in message ... I know you can do this in Excel using the 'datedif' function, but is it possible to get the same result in word, using a table?? I have a form in word where you have to enter a date of birth, and I'm sure it must be possible to get word to give you an age based on that date, rather than having to type it in... Any help appreciated.. Thanks very much Zed |
#5
|
|||
|
|||
Especially as most people prefer to lie about it.
"JoAnn Paules [MSFT MVP]" wrote in message ... It usually is. ;-) -- JoAnn Paules MVP Microsoft [Publisher] "Zed" wrote in message ... Thanks Pat, it does seem a very complex way of doing it.. may be just easier to type in the age!! "Pat Garard" wrote: G'Day Zed, I already wish I hadn't answered this. 1. The DATEDIF function is peculiar to Excel. VBA (and Word) have the DateDiff() Function. It is NOT easy to use Datedif() to calculate an age. We humans use a form of 'compound arithmetic' that DateDiff() does not - it directly gives an age in DAYS. To turn this into 'Human' Years, Months, Days is a pain! See (Function Age (...) bottom of Page): http://www.cpearson.com/excel/datedif.htm 2. In Word IT IS MUCH WORSE! You can not call VBA Functions directly as you can in Excel. See (for a reasonable fudge): http://wordtips.vitalnews.com/Pages/...th_Fields.html -- Regards, Pat Garard Melbourne, Australia _______________________ "Zed" wrote in message ... I know you can do this in Excel using the 'datedif' function, but is it possible to get the same result in word, using a table?? I have a form in word where you have to enter a date of birth, and I'm sure it must be possible to get word to give you an age based on that date, rather than having to type it in... Any help appreciated.. Thanks very much Zed |
#6
|
|||
|
|||
I don't lie but I rarely ever state my age directly.
-- JoAnn Paules MVP Microsoft [Publisher] "Jezebel" wrote in message ... Especially as most people prefer to lie about it. "JoAnn Paules [MSFT MVP]" wrote in message ... It usually is. ;-) -- JoAnn Paules MVP Microsoft [Publisher] "Zed" wrote in message ... Thanks Pat, it does seem a very complex way of doing it.. may be just easier to type in the age!! "Pat Garard" wrote: G'Day Zed, I already wish I hadn't answered this. 1. The DATEDIF function is peculiar to Excel. VBA (and Word) have the DateDiff() Function. It is NOT easy to use Datedif() to calculate an age. We humans use a form of 'compound arithmetic' that DateDiff() does not - it directly gives an age in DAYS. To turn this into 'Human' Years, Months, Days is a pain! See (Function Age (...) bottom of Page): http://www.cpearson.com/excel/datedif.htm 2. In Word IT IS MUCH WORSE! You can not call VBA Functions directly as you can in Excel. See (for a reasonable fudge): http://wordtips.vitalnews.com/Pages/...th_Fields.html -- Regards, Pat Garard Melbourne, Australia _______________________ "Zed" wrote in message ... I know you can do this in Excel using the 'datedif' function, but is it possible to get the same result in word, using a table?? I have a form in word where you have to enter a date of birth, and I'm sure it must be possible to get word to give you an age based on that date, rather than having to type it in... Any help appreciated.. Thanks very much Zed |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Does Word have Keyboard Merges like Word Perfect does? | Mailmerge | |||
Word2000 letterhead merge | Mailmerge | |||
Boiletplates from Word Perfect | Microsoft Word Help | |||
word xp crashes after macros are recorded | Microsoft Word Help | |||
Continuous breaks convert to next page breaks | Microsoft Word Help |