+ Reply to Thread
Results 1 to 3 of 3

Matching Array with an array

  1. #1
    Registered User
    Join Date
    11-01-2010
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    15

    Matching Array with an array

    I have a list of values in rows and a list of values in columns. I would to return a 1 if any value in the row matches any value in the column and a zero if otherwise. I can't figure out how to modify the MATCH function to do this, it only allows one value. I would think it is theoretically possible to use if functions but the rows and columns are about 30 long so it might get pretty cluttered. Thanks
    EX:

    1 2 3 2 1
    2 1 4 5 3
    1 2| 1 1 0 1 1
    2 5| 1 1 0 1 0
    3 4| 0 0 1 0 1


    Sorry that didn't get formatted correctly. Pretend like the lines are the boundary. Everything above and to the left is stuff already there. Everything else is dependent on the match statement i would like to tmake
    Thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: Matching Array with an array

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Forum Contributor
    Join Date
    12-22-2010
    Location
    Rio, Brazil
    MS-Off Ver
    Excel 2010, 2016
    Posts
    209

    Re: Matching Array with an array

    Quote Originally Posted by wondering2 View Post
    I have a list of values in rows and a list of values in columns. I would to return a 1 if any value in the row matches any value in the column and a zero if otherwise. I can't figure out how to modify the MATCH function to do this, it only allows one value. I would think it is theoretically possible to use if functions but the rows and columns are about 30 long so it might get pretty cluttered. Thanks
    EX:

    1 2 3 2 1
    2 1 4 5 3
    1 2| 1 1 0 1 1
    2 5| 1 1 0 1 0
    3 4| 0 0 1 0 1


    Sorry that didn't get formatted correctly. Pretend like the lines are the boundary. Everything above and to the left is stuff already there. Everything else is dependent on the match statement i would like to tmake
    Thanks
    Hi,

    A B C D E F G
    xxx xxx 1 2 3 2 1
    xxx xxx 2 1 4 5 3
    1 2 1 1 0 1 1
    2 5 1 1 0 1 0
    3 4 0 0 1 0 1


    Formula in C3
    =IF(AND(ISNA(MATCH($A3,C$1:C$2,0)),ISNA(MATCH($B3,C$1:C$2,0))),0,1)
    copy across and down

    HTH

    mlcb

+ 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