+ Reply to Thread
Results 1 to 15 of 15

Hlookup and Match?

  1. #1
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    72

    Hlookup and Match?

    Hi,

    I have attached an example spreadsheet, which shows the numbers I want to be returned (in bordered boxes).

    I have a number of lists relating to specific people, which include a date and a name on each row.

    I want to find where, for example, Simon is in Charles' list (3rd). I can easily do this by using a match formula.

    However, I want excel to lookup the name to find the relevant list (be it Charles, John, whatever), then match the date to return the number 3.

    Any ideas?

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Hlookup and Match?

    I think what you want is an INDEX MATCH combination but I am not sure what you want, even after looking at your attachment. Are you wanting to use the Dates and Names in columns A and B to look up the row in the corresponding table?
    Despite the high cost of living, it remains very popular.

    Don't forget to mark threads SOLVED when you get an answer and rep all the geniouses that helped you today!

  3. #3
    Registered User
    Join Date
    11-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Hlookup and Match?

    In c2

    =IF(B2="John",MATCH(1,INDEX(($F$2:$F$5=$A$1)*($E$2:$E$5=A2),0)),IF(B2="Charles",MATCH(1,INDEX(($J$2:$J$5=$A$1)*($I$2:$I$5=A2),0)),""))

    Copied down

  4. #4
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Hlookup and Match?

    Quote Originally Posted by Hawkeye16 View Post
    Are you wanting to use the Dates and Names in columns A and B to look up the row in the corresponding table?
    Yes, that's correct.

  5. #5
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Hlookup and Match?

    Quote Originally Posted by Novice_XL View Post
    In c2

    =IF(B2="John",MATCH(1,INDEX(($F$2:$F$5=$A$1)*($E$2:$E$5=A2),0)),IF(B2="Charles",MATCH(1,INDEX(($J$2:$J$5=$A$1)*($I$2:$I$5=A2),0)),""))

    Copied down
    That works well for those 2, (and is therefore much better than I managed), but I'm wanting this to work if lots more people are added, and this formula requires changing for each added person. Is there any way of making it scalable?

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

    Re: Hlookup and Match?

    =iferror(MATCH(A2,INDEX($E$2:$J$5,0,MATCH(B2,$E$1:$J$1,0)-1)),"") will give those numbers
    note: edited range
    Last edited by martindwilson; 07-04-2014 at 09:35 AM.
    "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

  7. #7
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Hlookup and Match?

    I agree with MDW - that is what I would use as well.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Hlookup and Match?

    Or you may try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of just Enter.

    In C2
    Please Login or Register  to view this content.
    and copy down.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  9. #9
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Hlookup and Match?

    sktneer - what is the benefit of that over what MDW provided?

  10. #10
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Hlookup and Match?

    Quote Originally Posted by martindwilson View Post
    =iferror(MATCH(A2,INDEX($E$2:$J$5,0,MATCH(B2,$E$1:$J$1,0)-1)),"") will give those numbers
    note: edited range
    That's good, any idea why it's not working for the others? (see attachment)
    Attached Files Attached Files

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Hlookup and Match?

    Quote Originally Posted by Hawkeye16 View Post
    sktneer - what is the benefit of that over what MDW provided?
    His formula (after editing) is simplest one while mine is not.

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

    Re: Hlookup and Match?

    simon is in a1 it needs to be consistent so simon should be in b1

  13. #13
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Hlookup and Match?

    Quote Originally Posted by martindwilson View Post
    simon is in a1 it needs to be consistent so simon should be in b1
    Well spotted. Thanks a lot for your help.

  14. #14
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Hlookup and Match?

    Check the attachment...


    Say thanks, Click *
    Attached Files Attached Files

  15. #15
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Hlookup and Match?

    Quote Originally Posted by Vikas_Gautam View Post
    Check the attachment...

    Say thanks, Click *
    Did that helped Simonlock...

    Waiting for *

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Index/match/hlookup?
    By Shadefalcon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2013, 08:34 AM
  2. Hlookup and Index match?
    By geng in forum Excel General
    Replies: 4
    Last Post: 12-05-2010, 11:21 PM
  3. Hlookup and Match or Index and Match?
    By katja328 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2009, 12:33 PM
  4. Hlookup / Match
    By Harlequin in forum Excel General
    Replies: 3
    Last Post: 03-22-2007, 07:26 AM
  5. Replies: 2
    Last Post: 04-06-2005, 07:06 PM

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