+ Reply to Thread
Results 1 to 4 of 4

Thread: lookup multiple dates

  1. #1
    Registered User
    Join Date
    05-30-2010
    Location
    US, US
    MS-Off Ver
    Excel 2008
    Posts
    3

    lookup multiple dates

    I've inherited a rolling schedule in a spreadsheet. There is one week for every four columns (name, last contact, last meeting, next contact). The next contact column contains names that are contacted every 3 months or every 6 months. It doesn't work as it's set up, as the columns just repeat, and last time I checked, 3 months from now doesn't occur on the same date as 6 months from now.

    I'd like to figure out a lookup that will, for example, pull all instances of July 1 in "next contact" and return all four columns for that row - so I see the name of the person, the last contact, last meeting, and the next contact columns. A vlookup or an hlookup would want a column number, which would be 52 different numbers, so that doesn't work. Does this even seem possible?

    I've attached a sample - I hope it works. Thanks for your thoughts
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    251

    Re: lookup multiple dates

    Is this what you wanted (please see attached)? It is a non VBA approach using a number of functions. You can change the week number and date in Sheet2 to return the matching data from Sheet1.

    Please note that if you have large amounts of data this is probably not the most efficient approach.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-30-2010
    Location
    US, US
    MS-Off Ver
    Excel 2008
    Posts
    3

    Re: lookup multiple dates

    Holy cow! Yes, it is. How did you *do* that? Brilliant! I can't even follow that formula- which is sort of the problem, because I can't really duplicate it. But I could use it as a lookup and cut and paste the resulting data into a new schedule...which probably makes the most sense. That looks like it was a lot of work. Thank you!

  4. #4
    Valued Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    251

    Re: lookup multiple dates

    I adapted a formula that contaminated came up with in another thread. A good starting point would be to break the formula down into its component parts and use Help on this function in Insert Function (fx) next to the Formula Bar.

    In summary, the formula determines the column to INDEX based on the week number you input, and then finds the row position of the 1st, 2nd, 3rd etc. occurrence of the date you input in the column 3 columns to the right of the week number column i.e. the Next Contact column, so the formula is dependent on the layout being consistent with the layout in the example workbook.
    Last edited by pb71; 05-31-2010 at 06:05 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0