+ Reply to Thread
Results 1 to 12 of 12

index match

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    index match

    Hi Guys.

    In the attached you have two sheets i use:

    1. people & hours
    2. summary

    im trying to write an index match statement in the summary sheet in cell G11 which looks at the date in A11 and looks at the room number in either b7 or d7 and match these conditions to date and room number in the people & hours sheet and return the value.

    currently i have the following array formula and cannot work out what i need to change:

    =INDEX('People&Hours'!I3:I16,MATCH(D7,'People&Hours'!H3:H16,0),MATCH(MONTH(A11),'People&Hours'!G3:G16,0))

    Then i need to replicate this in H11 for total number of hours.

    Please help, thanks

    5h1l
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: index match

    in your 2nd match, you are looking for a month number (1-12) in a column full of actual dates. Perhaps use =MONTH(G3) in column O sheet1 and then use that in the match?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: index match

    i took that formula from a previous file, and assumed i needed it. i dont need to match by month, i need to match by whole date.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: index match

    ok cool, then just remove the month() part...leave the cell ref though

  5. #5
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,313

    Re: index match

    You can't use 'index' this way because:
    The first 'match formula' gives as result a rownumber youre looking for
    The second gives a column number.

    People&Hours'!I3:I16 is not a square so it won't work
    Last edited by popipipo; 03-12-2013 at 06:24 PM.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  6. #6
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: index match

    i left it like:=INDEX('People&Hours'!I3:I16,MATCH(D7,'People&Hours'!H3:H16,0),MATCH(A11,'People&Hours'!G3:G16,0))

    and now its returning #ref....

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: index match

    ooops good catch pop...

    try this instead...

    on sheet1 add a helper column (you can put it anywhere and then hide it if you want) I used O

    in the helper, copy this down...
    =G3&H3

    then change the formula in summary to this...
    =INDEX('People&Hours'!I3:I16,MATCH(A11&D7,'People&Hours'!O3:O16,0),1)

  8. #8
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: index match

    is there a special way i need to paste the formula. i have tried using auto fill to insert the formula below and its not working.


    I have even tried to freeze certain parts of the formula to freeze the cells and now have: =INDEX('People&Hours'!I$3:I$16,MATCH(A12&$D$7,'People&Hours'!$O$3:$O$16,0),1)

    But this doesnt work.

    If someone has a solution without putting in the helper, that would be great.

    Thanks

    5h1l

  9. #9
    Registered User
    Join Date
    10-29-2012
    Location
    Estonia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: index match

    Hey, you need extra helper column cause you have three dates that are exactly same. You need extra column that makes them to differ from each other.
    Thats why you need to add up room number and date.

  10. #10
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: index match

    OK i have the formula working however when i try to copy the formula down using autofill it doesnt work.

    Does each formula have to be pasted as an array formula using shift+cntrl+enter?

    Thanks

    5h1l

  11. #11
    Registered User
    Join Date
    10-29-2012
    Location
    Estonia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: index match

    Hey
    Use this
    =INDEX('People&Hours'!I:I;MATCH(A11&$D$7;'People&Hours'!O:O;0);0)

  12. #12
    Registered User
    Join Date
    12-13-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: index match

    Hi San

    This formula has an error in it and doesnt work.

+ 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