+ Reply to Thread
Results 1 to 3 of 3

Issues With Index/Match Not Working Correctly.

  1. #1
    Registered User
    Join Date
    07-30-2009
    Location
    Idaho
    MS-Off Ver
    Excel 2007
    Posts
    2

    Issues With Index/Match Not Working Correctly.

    I have 3 tables that I am using and want to fill in cells in table 1 with correct values given data from that table, as well as from table 2 and table 3.

    I am attaching the example of the issue.

    I want to look up a value based on date, hour, and day of the week. The value is different depending on week, time of day, and day of week. I want zero if day of the week is 1 or 7. If day of week = 2-6 then I only pull values for hours 15-20 (otherwise 0). I am using an indicator value for a date range which is the first day of the date range (week). I think that is what is giving me the issues because it does not like the first or last day of a week. The middle days of the week long period lookup values correctly.

    In the Example, I'm trying to fill in the column Looked Up Value. I have highlighted where it doesn't work. I think that I must be using the match and index incorrectly but can't figure out where. The general structure of the type of formula that I am using is below.


    =INDEX($D$24:$K$32,MATCH($B5,$C$24:$C$32,1),MATCH($D5,$D$23:$K$23,1)*VLOOKUP($C5,$H$5:$I$11,2))
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Issues With Index/Match Not Working Correctly.

    VLOOKUP($C10,$H$5:$I$11,2) =0 so how can match*0 find anything?
    not sure what you are trying to achieve ,why the days of week in col numbered 1-7 with no 4,5 but table 3 has 0 for 1/7
    there is probably a far simpler way to get what you want
    Last edited by martindwilson; 07-30-2009 at 05:05 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-30-2009
    Location
    Idaho
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Issues With Index/Match Not Working Correctly.

    Thanks for responding. I figured out the error. I had the vlookup within the Index parenthesis instead of completely outside of it. I fixed that and now it works well. Thanks 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