+ Reply to Thread
Results 1 to 7 of 7

find row based on multiple criteria

  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    find row based on multiple criteria

    in sheet bm1:
    i have to write "ptc" in H column and "1" in I column if sheet bm2 columns (G,R,S,T) contains row with same values like C,E,F,G columns.

    for example row 6 in bm1 matches row 12 in bm2

    example.xlsx
    Last edited by pugulis; 01-11-2016 at 04:03 PM.

  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
    28,152

    Re: find row based on multiple criteria

    In Bm1 column A

    =C2&E2&F2&G2

    In Bm2 column A

    =G2&R2&S2&T2

    in Bm1 column H


    =IFERROR(IF(VLOOKUP(A2,'bm2'!A2:A170,1,0)+0,"pct",""),"")

    in Bm1 column I

    =IF(H2<>"",1,"")

    Copy all formulas down columns

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,372

    Re: find row based on multiple criteria

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: find row based on multiple criteria

    Thank you very much!

    Don't you need to put A2:A170 in dollar signs here?
    =IFERROR(IF(VLOOKUP(A2,'bm2'!$A$2:$A$170,1,0)+0,"pct",""),"")

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,372

    Re: find row based on multiple criteria

    Yes. Have you tried the other formula offered?

  6. #6
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: find row based on multiple criteria

    Yeah, tried both variants, both work perfectly well!
    File size in 1st variant with 9000 rows - 13.5mb
    File size in 1st variant with 9000 rows - 14.5mb

    Yours is more easy to use but uses more memory. Thanks guys! You are genius!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,372

    Re: find row based on multiple criteria

    You're welcome. Thanks for the rep.


    It would probably be smaller if you changed the full column references to defined ranges, for example, $G$2:$G$? instead of $G:$G


    Regards, TMS

+ 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. find oldest date based on multiple criteria
    By Bax in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2015, 09:01 AM
  2. Find and replace multiple values based on criteria
    By samuelhzb in forum Excel General
    Replies: 6
    Last Post: 01-04-2015, 01:25 PM
  3. [SOLVED] Formula to find MAX value based on multiple criteria
    By coach.32 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-27-2014, 02:04 AM
  4. Replies: 3
    Last Post: 08-21-2013, 09:59 AM
  5. Find Matching Value based on multiple criteria
    By Sisonkemdala in forum Excel General
    Replies: 2
    Last Post: 05-09-2011, 07:26 AM
  6. Find the sum of a range based on multiple criteria
    By Jonsocks in forum Excel General
    Replies: 11
    Last Post: 01-13-2011, 07:20 AM
  7. find minimum of range based on multiple criteria
    By Weissme in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-21-2006, 12:25 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