Find latest date in column

M

macropod

Hi Bruno,

You could do this with fields, but it would be a lot of work.

Firstly, you can't reference dates in table cells. When you do so Word tries
to do math on them (i.e. dividing the numbers for dates in d/m/y format,
subtracting for dates in d-m-y format and adding for dates in d m y format).
So, to overcome that, you'd have to bookmark each date individually, then
use the bookmark references in your formula.

Secondly, the formula itself would have to test the dates in ISO format
(i.e. yyyymmdd) to do the comparison, then express then result in whatever
format you want.

Thus you'll end up with something like:
{=MAX({BkMrk1 \@ yyyymmdd},{BkMrk2 \@ yyyymmdd},{BkMrk3 \@ yyyymmdd}) \@ "dd
MMMM yyyy"}

Cheers
 
B

Bruno G.

I have a table column which contains dates. I want to show the largest date
in a field on another page. I've tried using the formula "= max(bookmark
b:b)", but it shows 0.0.

I'm sure I could do it with a macro, but I really would prefer using a
field... Any suggestions?

Bruno G.
 
J

Jezebel

Actually, it's not so easy. Within the body of the document dates are
*words* not numbers, so unless you've formatted them using ISO 8601
(yyyy-mm-dd), the notion of 'largest' is indeterminate. Word tables are not
spreadsheets.
 
B

Bruno G.

Thanks for your help!

Unfortunatly, I can't rely on user bookmarking the date when they add one to
the table... I guess I'll have to try something with VBA and one of the
document events...

Oh well... thanks anyway!

Bruno
 

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