+ Reply to Thread
Results 1 to 19 of 19

Advanced Lookup, Match and Merge Feature

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Advanced Lookup, Match and Merge Feature

    Hey Everyone,

    I got some amazing help from someone on the forum a few minutes ago and no I'm am trying to do the 2nd part of the project.

    I'll try to explain what I'm trying to do, but I have attached the same spreadsheet so you can see what i'm talking about.

    If you open the spreadsheet, I want the following to happen:

    I want to do a search with Column I & J, if it finds the name in column B & C then insert the Age Group in 1 column and the Gender in another one.

    I hope this makes sense

    thanks
    Attached Files Attached Files
    Last edited by d79k74; 04-20-2012 at 02:12 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: I can't Figure this out - How do I ?????

    Put this array formula in G2 and copy down and across.

    =IF(ISNA(MATCH($B2&$C2,$I$2:$I$11&$J$2:$J$11,0)),"",INDEX(K$2:K$11,MATCH($B2&$C2,$I$2:$I$11&$J$2:$J$11,0)))

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: I can't Figure this out - How do I ?????

    you will need to add a concatinated list to your lookup, so for example, add a new row between J and K and put this formula

    =I2&J2

    then in G you can do a lookup like this

    =VLOOKUP(B2&C2,K:L,2,0)
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: I can't Figure this out - How do I ?????

    or do what Bob suggested

  5. #5
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: I can't Figure this out - How do I ?????

    Hi Bob, I tried to highlight cell G2 and copy and paste the formula and I get an error saying that there is something wrong with the formula.

    am I doing something wrong?

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    looks like the forurms were randomly adding spaces to bobs formula... i think what he was going for (and probably pasted) is this:

    =IF(ISNA(MATCH($B2&$C2,$I$2:$I$11&$J$2:$J$11,0)), "", INDEX(K$2:K$11, MATCH($B2&$C2,$I$2:$I$11&$J$2:$J$11,0)))

    i added spaces to prevent the board from doing it in undesired locations

  7. #7
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    Thanks for your quick response, but once I highlight G2 cell and put the formula in, I don't get the same error but I get the following (#VALUE!) on the cell and all the cells under it when I drag the + to copy the functions the the cells below it.

    Am I doing something wrong?

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    it is an array formula, so you will need to confirm it using Ctrl+Shift+Enter.

    if done correctly you will see the formula surounded by { }

  9. #9
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    Sorry I don't understand, so how do I add the formula? it's not just a copy and paste?

  10. #10
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    you can paste the formula into the formula bar, and then instead of pressing enter, press Ctrl+Shift+Enter, and it will change the way Excel runs the formula to Array.

  11. #11
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    aha, that worked, it added the the value to the age group, but can i also add the gender to a column next to it?

    Thx

  12. #12
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    just need to change it like this:

    =IF(ISNA(MATCH($B2&$C2,$I$2:$I$11&$J$2:$J$11,0)), "", INDEX(L$2:L$11, MATCH($B2&$C2,$I$2:$I$11&$J$2:$J$11,0)))

  13. #13
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    Ok that seemed to work, the only issue im having now is that on the original attachment there were only only row with names on the right side, I actually have a total of 91 names that I need to do this to.

    I tried changing each # that was 11 on the formula to 91 and it didn't work.

    What am I missing?

  14. #14
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    you just need to extend the range of 2 and 11 to 2 and 91 or what ever your range is.

  15. #15
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    I wanted to add a another column for an email address and phone #'s, I tried to do the following formula where P$ what the Email and I got the following error

    "Microsoft Excel Cannot Calculate Formula, there is a circular reference in an open workbook, but the references that cause it cannot be listed for you. Try editing the last formula you entered or removing it with the UNDO command."

    Any ideas why this is happening?

    =IF(ISNA(MATCH($B2&$C2,$I$2:$I$91&$J$2:$J$91,0)), "", INDEX(P$2:P$91, MATCH($B2&$C2,$I$2:$I$91&$J$2:$J$91,0)))

  16. #16
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    its hard to tell without seeing your workbook... but it appears something is creating a circular reference there.

  17. #17
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    Ok,

    Take a look at the spreadsheet and let me know what im doing wrong

    I hope this helps

    thanks
    Attached Files Attached Files

  18. #18
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Advanced Lookup, Match and Merge Feature

    this formula should work... there is already a formula in I, make sure you erase that one first

    =IF(ISNA(MATCH($B2&$C2,$K$2:$K$91&$L$2:$L$91,0)), "", INDEX(O$2:O$91, MATCH($B2&$C2,$K$2:$K$91&$L$2:$L$91,0)))

  19. #19
    Registered User
    Join Date
    04-20-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Advanced Lookup, Match and Merge Feature

    That worked thanks

+ 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