+ Reply to Thread
Results 1 to 17 of 17

Search for two or more matching results in rows..

  1. #1
    Registered User
    Join Date
    03-21-2017
    Location
    Colombo
    MS-Off Ver
    2010
    Posts
    22

    Search for two or more matching results in rows..

    Hi,

    I need to use Find function to Find out two or more Matching Results comparing the data on a sheet to find the exact column where the data is available

    Eg.

    I have a 3 rows with data

    ROW J "ITEM"
    ROW K "MODEL"
    ROW L "MAKE"

    now i need to search for the ALL 3 ROWS TO MATCH THE DATA I NEED TO FIND

    12.PNG


    *************result should be SIDE MIRROR +PLEASURE N/M + UNBRANDED
    *PLEASE CHECK ATTACHMENT

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,145

    Re: Search for two or more matching results in rows..

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,848

    Re: Search for two or more matching results in rows..

    You are getting ROWS mixed up with COLUMNS, which is confusing your description.

    Pete

  4. #4
    Registered User
    Join Date
    03-21-2017
    Location
    Colombo
    MS-Off Ver
    2010
    Posts
    22

    Re: Search for two or more matching results in rows..

    My Bad,,

    I have attached the Document for clear demonstration.

    For example i have few items in my inventory and they are categorized item,colour and made
    NOW I NEED TO SEARCH FOR COLUMN THAT HAVE THE EXACT MATCH FOR MY QUERY .
    ITEM :APPLE / COLOR :GREEN / MADE : CHINA By using a Find function or any other available methods.

    SAMPLE.JPG

    *
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,145

    Re: Search for two or more matching results in rows..

    Which version of Excel do you have now?

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,848

    Re: Search for two or more matching results in rows..

    First of all, to make this more flexible, you need to be able to record the items that you are searching for, so you could use E2, F2 and G2 for ITEM, COLOUR and MADE (which you could copy into E1:G1), so put Apple, Green and China in E2:G2, then you can use this array* formula in cell I2:

    =IFERROR("Found in Row "&INDEX(ROW(2:10),MATCH(1,(A2:A10=E2)*(B2:B10=F2)*(C2:C10=G2),0),),"Not found")

    *Note that if you are using XL2019 or earlier, an array formula needs to be confirmed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual Enter.

    Note also, that you may need to use semicolons ( ; ) instead of commas ( , ) in the formula, depending on your regional settings.

    This assumes that there would only be one match to the criteria, as it will return the first row where the match occurs.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    03-21-2017
    Location
    Colombo
    MS-Off Ver
    2010
    Posts
    22

    Re: Search for two or more matching results in rows..

    HI Pete,
    It worked and Thank you for your time,

    but What if a have more than 1 match to the criteria to find ?
    and what if i need to search the entire book for the results ?

    Thank you

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,848

    Re: Search for two or more matching results in rows..

    Attach another workbook with examples of more than one match - you could use a helper column to identify these.

    I'm not sure what you mean by "search the entire book". Are you going to have more than 3 columns, or use rows down to the bottom of the sheet (1 million +).

    Pete

  9. #9
    Registered User
    Join Date
    03-21-2017
    Location
    Colombo
    MS-Off Ver
    2010
    Posts
    22

    Re: Search for two or more matching results in rows..

    Hi,
    I have attached the sample workbook .
    i am going to use rows down to the bottom of the sheet and the date is added time to time ...........

    thankyou

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,145

    Re: Search for two or more matching results in rows..

    Please answer my question before we continue: which version of Excel are you using?

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,848

    Re: Search for two or more matching results in rows..

    There is no new attachment, and I don't know what this means:

    ... the date is added time to time ...
    Help us to help you.

    Pete

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,145

    Re: Search for two or more matching results in rows..

    No further help until we know which Excel product is being used now, as it may be significant. I've asked three times already.

  13. #13
    Registered User
    Join Date
    03-21-2017
    Location
    Colombo
    MS-Off Ver
    2010
    Posts
    22

    Re: Search for two or more matching results in rows..

    attachment ,,,,,

    i use excel 2010..
    Attached Files Attached Files

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,145

    Re: Search for two or more matching results in rows..

    OK - thank you for confirming.

  15. #15
    Registered User
    Join Date
    03-21-2017
    Location
    Colombo
    MS-Off Ver
    2010
    Posts
    22

    Re: Search for two or more matching results in rows..

    Quote Originally Posted by fariskhan007 View Post
    Hi,
    I have attached the sample workbook .
    i am going to use rows down to the bottom of the sheet and the date is added time to time ...........

    thankyou
    sorry again!
    i Mean the spreadsheet is not completed and the data is kept added time to time when new stock arrive.....

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,145

    Re: Search for two or more matching results in rows..

    In K2 copied down:

    =IFERROR(INDEX(ROW(A$2:A$500),AGGREGATE(15,6,ROW($1:$500)/(($C$2:$C$500=$G$2)*($D$2:$D$500=$H$2)*($E$2:$E$500=$I$2)),ROW(1:1))),"")

  17. #17
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,848

    Re: Search for two or more matching results in rows..

    Here's another approach - put this formula in cell F2:

    =IF(COUNTIFS(C2,$G$2,D2,$H$2,E2,$I$2),MAX(F$1:F1)+1,"")

    Copy this down to the bottom of your data (or beyond, to accommodate new data being added). You can do this quickly by double-clicking the fill handle (in the bottom right corner of the cursor, with F2 selected).

    Then you can use this formula in K2:

    =IFERROR("Found in Row "&INDEX(ROW($F:$F),MATCH(ROWS($1:1),F:F,0)),"Not found")

    Copy this down for as many duplicates as you think there may be (e.g. for 10 rows). You could return other data instead of my original message - e.g. this formula in K2:

    =IFERROR("Found in Row "&INDEX(ROW($F:$F),MATCH(ROWS($1:2),F:F,0))&" on "&TEXT(INDEX(B:B,MATCH(ROWS($1:2),F:F,0)),"dd/mm/yyyy"),"Not found")

    would return the date from column B as well as the row number where the duplicate occurs.

    Hope this helps.

    Pete

+ 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. Replies: 7
    Last Post: 07-27-2022, 01:26 AM
  2. Replies: 4
    Last Post: 01-13-2019, 01:46 PM
  3. Replies: 5
    Last Post: 07-13-2018, 08:49 AM
  4. [SOLVED] Search Multiple columns for string, display matching results on different sheet.
    By RichTea88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2013, 06:53 AM
  5. [SOLVED] Search for a partial string match and cycle through matching results
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2013, 08:27 AM
  6. Search for matching text, then delete rows above it.
    By mainer188 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-09-2009, 05:33 PM
  7. search for matching cells and combine results
    By meacho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2007, 08:25 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