formula in word

A

ALEMCoord

Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC I see how to set the formula in Excel, but I wanted to know if you can Calculate the # Years Months & Days Difference Between Two Dates in a word table (I need to calculate Chronological Age-- where Today's date will always be updated, and subtract birthdate in a given cell.)
 
A

ALEMCoord

Thanks, Macropod. I did find those links when I googled before. Unfortunately, I am a bit challenged in translating your fine work into what I need. In fact, I have spent several hours trying different things with fields and bookmarks.

In my word table, I have already entered students' birthdates (DOB) and need it to auto calculate their current age in the next column by year-month. i.e.
DOB CA
3/2/88 21-9

I can do this easily in excel with
=DATEDIF(F2,TODAY(),"y")&" - "&DATEDIF(F2,TODAY(),"ym")

but can't figure out how you're showing me in your fine document. I wish I could just switch my doc to excel, but unfortunately, I need it in word for wrap and cell merge qualities. Any help you can give beyond what you already have would be GREATLY appreciated!
 
M

macropod

Hi ALEMCoord,

For what you want to do, the second field example under the heading "Interactively Calculate A Person's Age" (i.e. the formfield
example) is probably the nearest to what you need.

If you bookmark the date in the table cell (not the whole cell) with the name 'BirthDate', the field will return the age to the
nearest year, month and day. You can simple delete whatever you don't need from the part of the field between the following double
quotes:
"Your age is {Years} Year{IF{Years}= 1 "" s}, {Months} Month{IF{Months}= 1 "" s} and {Days} Day{IF{Days}= 1 "" s}."
 
A

ALEMCoord

Thanks, Macropod, but I had already tried that. The problem is that I have an on-going growing list of students with birthdates. So when I did that, it bookmarked the one birthdate and used that for all students in the table. The only way I could see to make it work was to bookmark each and every birthdate. Is there a simpler way? One that will automatically set the whole table up to calculate for each student? (I have over 60 students...and growing.)

Thank you for your help and Happy New Year! : )
ALEMCoord
 
M

macropod

Hi ALEMCoord,

Unfortunately, Word doesn't support cell referencing of the kind Excel uses for anything other than basic numbers. Use cell
referencing to refer to a cell containing a date (eg dd/mm/yyyy or dd-mm-yyyy) and Word will oblige you with a division calculation
on the dd/mm/yyyy form or a subtraction calculation on the dd-mm-yyyy form! The only way around that is to use:
.. individual bookmarks and field calculations for each bookmark;
.. an Excel worksheet embedded in the Word document to do all the calculations; or
.. a macro (which you could trigger with a MACROBUTTON field).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top