+ Reply to Thread
Results 1 to 7 of 7

Searching for a match over multiple columns and rows

  1. #1
    Registered User
    Join Date
    06-12-2019
    Location
    London
    MS-Off Ver
    1808
    Posts
    11

    Searching for a match over multiple columns and rows

    I am trying to search a matching value over multiple rows and columns.

    I want to search for a value entered in Column Q from selection B3:B102, C3:C102, D3:D102, E3:E102, F3:102, then when a match is made in a row return the text that is in Column G in the same row to Column P
    Attached Files Attached Files

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,433

    Re: Searching for a match over multiple columns and rows

    Could you please add a few rows of expected results manually and post again? 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
    Registered User
    Join Date
    06-12-2019
    Location
    London
    MS-Off Ver
    1808
    Posts
    11

    Re: Searching for a match over multiple columns and rows

    Updated example with expected results
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    04-06-2006
    Posts
    131

    Re: Searching for a match over multiple columns and rows

    There may be smarter ways of doing this (my formulas tend to be somewhat cumbersome) but this approach does work. This would be in Cell P8 in your sample, searching for the 333 in Q8:

    Please Login or Register  to view this content.
    Hope that helps!
    Last edited by nevi; 07-26-2019 at 04:15 PM.

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,372

    Re: Searching for a match over multiple columns and rows

    Another option, put this on P3 and ENTER as array formulas, press all together CTRL+SHIFT+ENTER button, then copied down as necessary

    =IFERROR(INDEX($G$3:$G$102,SMALL(IF($B$3:$F$102=$Q3,ROW($G$3:$G$102)-ROW($G$3)+1),COUNTIF($Q$3:Q3,Q3))),"")
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-12-2019
    Location
    London
    MS-Off Ver
    1808
    Posts
    11

    Re: Searching for a match over multiple columns and rows

    =IFERROR(INDEX($G$3:$G$102,SMALL(IF($B$3:$F$102=$Q3,ROW($G$3:$G$102)-ROW($G$3)+1),COUNTIF($Q$3:Q3,Q3))),"")

    This is the solution I ended up using and it works great. However now I have a secondary use for the same formula.

    If there are 2 or more numbers the same within the $B$3:$F$102 area then only the highest in the column is returned and the rest return blanks. Is there a way to allow multiples?

    Thanks

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,648

    Re: Searching for a match over multiple columns and rows

    It may help us understand this additional request if you could upload another file that illustrates the issue of "2 or more numbers...". Please include expected results so that we will have something against which to test formulas/code.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Index Match accross two sheets with two crieteria searching in multiple columns
    By EmmatheDancer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-09-2015, 11:56 AM
  2. Searching Multiple Columns in Separate Sheet for a Match
    By jasonad0017 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-11-2015, 06:38 PM
  3. VLookup or Index/match searching rows instead of columns or multiple criteria
    By Groovicles in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-16-2013, 05:00 PM
  4. [SOLVED] Find exact match in multiple columns in 1 row with all other rows 90,000 rows.
    By KHurt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2013, 01:38 PM
  5. Replies: 12
    Last Post: 02-01-2013, 03:05 PM
  6. [SOLVED] Searching Multiple rows and Columns
    By Galanthathorpe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2012, 03:17 PM
  7. [SOLVED] Searching rows with multiple columns criteria
    By wmclemore in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-07-2006, 12:15 PM

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.6.0 RC 1