+ Reply to Thread
Results 1 to 11 of 11

Thread: Lookup into range

  1. #1
    Registered User
    Join Date
    04-19-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    13

    Lookup into range

    Hi,
    I would like to compare two product plans to see which items on plan A appear on plan B.
    Essentially this would be a lookup but, instead of looking into a single column, it could be anywhere in an array.
    I can do a simple FIND for each item, but there are many hundreds to search for.
    I attach a sample of the two plans and how the results would look. The result could say a simple 'match' or 'no match' or, if it is possible, the col and row ref of the location in the second plan.
    Thanks.
    Attached Files Attached Files
    Last edited by Feastie; 10-21-2011 at 09:34 AM.
    There's always a way.

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

    Re: Lookup into range

    With the sample you show, it seems that you are comparing cell to cell? i.e. =B4=O4 copied down and across. If not, can you elaborate a bit?
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    04-19-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup into range

    It's not quite that simple as one to one, it's one to many, as the item in one position on plan A may be present on plan B but in a different location.
    There's always a way.

  4. #4
    Registered User
    Join Date
    04-19-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup into range

    Hi,
    I have found a way around it using countif - As in Countif('range for plan B','first item in plan A') if it shows 1 it's in, otherwise it's not.
    I can work it from this but, just out of interest, is there a more suitable way of doing this?
    There's always a way.

  5. #5
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Lookup into range

    So you want to check if B4 value is found anywhere within O4 to Y15?
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  6. #6
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Lookup into range

    Yes, if you answered yes to my question, I would have recommended the COUNTIF to. It is the best and quickest way. You can always wrap and IF around it if you need certain text as a result.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  7. #7
    Forum Contributor
    Join Date
    05-14-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Lookup into range

    Hi ,

    You can also try conditional formatting, which would be probably be more quicker and easier to identify as well

    Please see attached file for better understanding.

    In Plan B I have used conditional formatting to match same cells in plan A and which ever match are highlighted in Green

    Regards,

    Veejar
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-19-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup into range

    veejar - Unfortunately that would only work if the items were in the same position on both plans, which they aren't always, unless I'm not understanding what you have done.
    NBVC - I have used a bit of IF nesting to spruce it up thanks. In my initial post I asked if there would be a way of inserting the plan refs instead of just a YES/NO, any ideas?

    Regs, Feastie
    There's always a way.

  9. #9
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Lookup into range

    If you can use conditional formatting as suggested by veejar, then you can use COUNTIF too and that would be neater than getting a formula to return the address, especially if there is a possibility of duplicates.

    e.g.

    use conditional format formula in B4:L15

    =COUNTIF($O$4:$Y$15=B4)>0
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  10. #10
    Registered User
    Join Date
    04-19-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup into range

    NBVC - There shouldn't be any duplicates, but it is a possibility.
    I can certainly work with these suggestions, I particularly like the combo of conditional formatting wth the COUNTIF.
    Many thanks for both of your help.
    There's always a way.

  11. #11
    Forum Contributor
    Join Date
    05-14-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Lookup into range

    Hi Feastie,

    Well Thats True it would work only if the value is in the position. But I was just suggesting another way to do it. Hope you got the solution

    Regards,

    Veejar

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0