+ Reply to Thread
Results 1 to 8 of 8

Matching a duplicate row of numbers in a list of numbers in rows

  1. #1
    Registered User
    Join Date
    08-12-2012
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    47

    Matching a duplicate row of numbers in a list of numbers in rows

    Hi Forum,

    I've been trying to figure out how to use Index/Match or ISERROR function in Excel to compare a row of selected numbers in a list of other numbers looking for an exact match. Any function in excel which would work better or simpler will do also.

    I need to figure this out for a Lotto check spreadsheet that I've made which takes a set of numbers and looks for an exact match in a list of drawn numbers. I think I may need to use and array type function but it doesn't seem to work. I've attached a spreadsheet below which hopefully shows what I'm trying to do. If you look in the "Match" tab in cell H1 I'm trying a function which I hoped would look at the set of numbers A1:G1 and try to find an exact match from the "Drawn numbers" tab for any set of numbers in Rows 1 to 30 and state whether there is a matching set of numbers or not. The blank row in the "Drawn Numbers" worksheet is a bit of a test to see what would happen in the event of no numbers in a row. As you can see the function returns yes beside each row of number in the Match worksheet but those numbers don't match any rows of numbers in the Drawn numbers worksheet except for the last row which should match the last row on both worksheets. I hope this makes sense.

    Thanks,

    Sebastien.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,791

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    try in H! and copy down:

    =IF(SUMPRODUCT(--(A1='Drawn numbers'!$A$1:$A$30),--(B1='Drawn numbers'!$B$1:$B$30),--(C1='Drawn numbers'!$C$1:$C$30),--(D1='Drawn numbers'!$D$1:$D$30),--(E1='Drawn numbers'!$E$1:$E$30),--(F1='Drawn numbers'!$F$1:$F$30),--(G1='Drawn numbers'!$G$1:$G$30)),"yes","no")

  3. #3
    Registered User
    Join Date
    08-12-2012
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    Sorry, that didn't work. Even so, if I understand correctly, it is summing up all values in each row and comparing the sums for a match, and it should post yes or no based on the match of two sums. Is that correct? If it did work there are a lot of sums which are equal but don't match up.
    Thanks anyways,

    Sebastien.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    Maybe this...

    =SUMPRODUCT(--(MMULT(--(A1:G1='Drawn numbers'!A$1:G$30),{1;1;1;1;1;1;1})=7))

    Copy down as needed.

    EDIT: Ooops! I forgot half of the formula!

    =IF(SUMPRODUCT(--(MMULT(--(A1:G1='Drawn numbers'!A$1:G$30),{1;1;1;1;1;1;1})=7)),"You just won millions of dollars!","Try again")
    Last edited by Tony Valko; 05-17-2015 at 07:04 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    08-12-2012
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    Hey, that worked! Thanks! Can you do me a favour and maybe explain what the function does? If you don't mind and have time and it's not too involved.

    Sebastien.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    MMULT (matrix multiplication) is hard to explain.

    Here's an explanation I wrote for a similar problem several years ago:

    http://www.tech-archive.net/Archive/.../msg00758.html

    See if that helps.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,791

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    This works! The last row is matched as required.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-12-2012
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Matching a duplicate row of numbers in a list of numbers in rows

    Thanks for the help. I still want to figure out how to utilize Index/match function though eventually. I think I'm not quite understanding how to use arrays. lol.

    Sebastien.

+ 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. Return a list of all matching numbers
    By samcdavies in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:17 AM
  2. Replies: 5
    Last Post: 10-23-2012, 11:44 PM
  3. Help matching rows and replacing numbers associated with them
    By backside9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2010, 04:52 PM
  4. Checking for duplicate numbers in a list
    By Zaraf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-21-2008, 05:43 PM
  5. Deleting rows matching numbers from numbers in column
    By cyki in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-11-2008, 09:16 AM

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