+ Reply to Thread
Results 1 to 6 of 6

Using MATCH to find row number based on a two-column lookup.

  1. #1
    Registered User
    Join Date
    06-28-2016
    Location
    Oz
    MS-Off Ver
    2013
    Posts
    4

    Using MATCH to find row number based on a two-column lookup.

    Hi All,

    I'm needing to find the actual number of a desired row based upon a lookup of two values in a column. For example, consider this table:

    Col1 Col2 Col3 Col4
    1 A XXX YYY
    1 B YYZ AFC
    2 A GDS CCV


    Say I wanted to find the row that had 'Col1' as '1' and 'Col2' as 'B', how could I construct a match function to return the row number?

    I've tried things like:

    Critera1 = "1"
    Critera2 = "B"
    myRow = Application.WorksheetFunction.Match(Critera1 & Critera2, Range("RefSheet!$A$2:$A$4") & Range("RefSheet!$B$2:$B$4"), 0)

    But this is continually returning an error.

    Thanks in advance for any help offered.
    Anubis.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Using MATCH to find row number based on a two-column lookup.

    Please Login or Register  to view this content.
    Kind regards
    Leo

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Using MATCH to find row number based on a two-column lookup.

    Try
    Please Login or Register  to view this content.
    Last edited by jindon; 10-15-2016 at 08:34 AM.

  4. #4
    Registered User
    Join Date
    06-28-2016
    Location
    Oz
    MS-Off Ver
    2013
    Posts
    4

    Re: Using MATCH to find row number based on a two-column lookup.

    Thank you both for your solutions. I was hoping there would be a one-liner function that might do the job, but this works perfectly as an alternative.

    Thanks
    Anubis.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Using MATCH to find row number based on a two-column lookup.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Using MATCH to find row number based on a two-column lookup.

    May be
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

+ 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] Find Match or Next Lowest Number In Descending Column of Numbers
    By skywriter in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2015, 11:24 PM
  2. Using Lookup? Index match? to populate cells based on column header
    By NoExcelSkills17 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-15-2015, 03:50 PM
  3. Replies: 4
    Last Post: 11-20-2014, 09:23 PM
  4. Find row & column number of cells in a range with lookup functions
    By ieumts in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-02-2014, 03:01 AM
  5. [SOLVED] Find the row number with a partial match to text in column A
    By zookeepertx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-10-2014, 01:39 PM
  6. Replies: 5
    Last Post: 02-13-2014, 05:37 PM
  7. Match Column A's Project number to change based on greater number in new row
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2013, 10:18 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