+ Reply to Thread
Results 1 to 3 of 3

Match & Index Between Dates

  1. #1
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Match & Index Between Dates

    This is one of those stupid things that I thought would be simple.

    I have spreadsheet comprised of 2 worksheets: Sheet 1 is a raw data sheet and contains information pulled from several different workbooks. Sheet 2 is the calculations sheet.

    Sheet 1 looks something like this:

    Please Login or Register  to view this content.
    This is a sample of a much larger batch of data and is simply dates on which a certain piece of equipment is booked out. Merging the information from the separate sheets stacks the information in sheet 1.

    Sheet 2 looks something like this:

    Please Login or Register  to view this content.
    And is a visual calendar of sorts.

    What I need is a vlookup type formula that I can enter into each empty cell on sheet 2 that will display the word "Yes" if a piece of equipment has been booked out on the date displayed in the column header. So looking at my first example at the top, Sheet 2 would wind up looking a bit like this:

    Please Login or Register  to view this content.
    I know it's a Match, Index, Vlookup deely, but I can't for the life of me figure it out.

    Any ideas?
    Last edited by jennyaccord; 12-14-2011 at 01:07 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Match & Index Between Dates

    something like:

    =IF(SUMPRODUCT(--('Sheet1'!$A$2:$A$100=$A2),--('Sheet1'!$B$2:$B$100<=B$1),--('Sheet1'!$C$2:$C$100>=B$1)),"Yes","")

    adjust sheetname and ranges to suit... then copied down and across the matrix.

    If you are using Excel 2007, you can use COUNTIFS instead:

    =IF(COUNTIFS('Sheet1'!$A$2:$A$100,$A2,'Sheet1'!$B$2:$B$100,"<="&B$1,'Sheet1'!$C$2:$C$100,">="&B$1), "Yes","")

    which is more efficient.
    Last edited by NBVC; 12-14-2011 at 01:09 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-22-2009
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Match & Index Between Dates

    Flippin' Sumproduct. I love Sumproduct. I've been messing around with Match and Index and completely forgot about Sumproduct.

    Thank you.....again.

+ 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