+ Reply to Thread
Results 1 to 8 of 8

Lookup and match Information based on a date

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Question Lookup and match Information based on a date

    Good Morning Folk

    I'm trying to consolidate and isolate information in a list based on a date, in the attached sheet when a date is inserted I need it to show the information relevant to that date. I've tried using the Index and match function but can't get it to work properly,,

    Any help would be very much appreciated

    Many Thanks

    jim
    Attached Files Attached Files
    Last edited by JamesT1; 03-16-2012 at 06:35 AM.

  2. #2
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544

    Re: Lookup and match Information based on a date

    Why don't you use a Datafilter on the set of data ?
    Just keep it simple !


    http://www.excelguide.eu
    In English as well as in Dutch

  3. #3
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Lookup and match Information based on a date

    You could probably do something clever with an OFFSET function by matching the date in the date column, if you're confident that all the data for a given date will be together.

    However, the attached uses a different approach to index each entry of the selected date (using a COUNTIF in a new column A, labelled 'Helper Count'); then you just need to use VLOOKUP in your output table to extract the relevant data. I added an 'Item' column to the output to make it easy to see what's going on, but you could equally calculate the number within the VLOOKUP using ROW().
    Attachment: Match Information.xls

    If you want to get rid of the #N/As at the bottom of the table you need to use IF(ISERROR(VLOOKUP(...)),"-","VLOOKUP(...)). [One of the super additions to Excel 2007 is the IFERROR function, which removes the need to duplicate the VLOOKUP in this way....]

  4. #4
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Lookup and match Information based on a date

    Hi WinteE

    For simplicity I put the list and destination cells in the same sheet, to get a working formula

    the actual information is stored on a different workbook from the dstination cells and it is hidden

  5. #5
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Lookup and match Information based on a date

    Hi outofthehat

    Thanks for the information, my current sheet has a similar set up in it, however the list is getting longer as the information is inserted daily, so I copied the equations all the way down, now it takes a while for the sheet to open and isolate the information when its asked for. I'm looking for a way with less equations to make it work faster by referecning the list diredt

  6. #6
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Lookup and match Information based on a date

    Okay, try this one. For simplicity I've created two separate cells calculating where your selected day starts in the data and how many rows it has (You can bury these inside the formula if you like...). You can then use an OFFSET function to look up each bit of data - so, for example, J2 has this in it:
    Please Login or Register  to view this content.
    To explain.
    1. If the row you're currently in (here, row 2) is bigger than no of rows of data +1 (because of the titles in the output data), then put in a dash. Otherwise do the offset>
    2. OFFSET takes min 3 values - cell to start in, how many rows to offset by, how many columns to offset by. So, starting in B1, the top of the 'Route' data, you need to calculate the number of offset rows. I've bracketed them to make them easier to read.
    3. Firstly, $I$3-1. I3 shows the row number of the first entry you're interested in, so if you're interested in row 8 but are starting in row 1, then you need to offset by 7 (hence the -1).
    4. Secondly, when you copy the formula down in the output data, you need to increment this by 1 for each row that you're copying it down. The first bit of data is in row 2 because of the titles, and that one shouldn't be incremented; the second bit of data is in row 3, and should be incremented by 1; etc. Hence ROW()-2

    There are experts on this forum who can give you advice on which should run faster, but unfortunately I'm not one of them!
    Attached Files Attached Files

  7. #7
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544

    Re: Lookup and match Information based on a date

    Hi JamesT1

    This could be done with a macro.

    Filter on the data set and then a copy/past selected cells.

  8. #8
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Lookup and match Information based on a date

    outofthehat

    thats what I needed, it now works a lot quicker, many thanks for your help..

    WintE, thanks for your advice, a macro was a possibility I was thinking off is I couldnt get a solution any other way,

    Jim

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.6.0 RC 1