Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2010
    Location
    New Jersey
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi all,

    I'm using a Word 2007 formula to grab the MAX numeric value from a column of a table, like this:

    Ver | Date
    0.1 | 2010-01-07
    0.2 | 2010-03-10
    0.3 | 2010-05-15


    I use a formula like this:

    =MAX(MyTable [A2:A1000])

    And it returns the correct result (0.3 in this case). I need to do something similar with the Date column (Column B in this example). However, when I use the MAX function it treats the date as numeric expressions (2010 minus 01 minus 07, for instance) and returns an integer value representing that calculation instead of a date. Is it possible to grab the MAX date from the table using a formula or other method? I am limited in that I can't use VBA/Macros to do this task.

    Thanks
    Mike C

  2. #2
    New Lounger
    Join Date
    Jul 2010
    Location
    New Jersey
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Better yet, is it possible to grab the date value from the same row which has the MAX "Ver" value? That would be even better.

    Thanks
    Mike C

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    The max function doesn't appear to work on string values and I don't see an offset type function in Word.

    Perhaps you need to link the data out to Excel and then link the result back into Word. Could that work with an embedded worksheet inside the Word document itself?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    New Lounger
    Join Date
    Jul 2010
    Location
    New Jersey
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Andrew,

    Thanks, but creating and maintaining a new Excel spreadsheet to update a single field in a Word document isn't a workable solution for this case. If I were going to do something along those lines (storing a table of data remotely to perform a lookup against it to populate a single field in a Word doc) I'd probably do it through SQL Server. Basically all I need is the MS Word equivalent of Excel's VLOOKUP function, if such a thing exists. The MAX function appears to take the ISO formatted dates (2010-01-01) and treats them as mathematical expressions (2001 minus 01 minus 01), returning an integer (1999 in this case). Is there no way to do something similar to Excel's VLOOKUP short of writing custom VBA macros?

    Thanks
    Mike C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •