+ Reply to Thread
Results 1 to 4 of 4

Matching criteria in different rows

  1. #1
    Registered User
    Join Date
    04-19-2016
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    2

    Smile Matching criteria in different rows

    Hi everyone, I have attached a workbook containing two worksheets (A & B). I would like a formula/macros to lookup B, find the value in row n, and return it in A. I have provided examples in A on what values should be obtained.

    As shown, there are specific criteria in Worksheet B that must be fulfilled before the value can be identified:

    1. Matching "Activity Number" must be in row n+1.
    2. "Activity" in row n must be "Open", while "Close" in row n+1.
    3. "Position" in row n must be of non-numeric value.
    4. "Unit" in row n must match that in Worksheet A.
    5. "In/Out" in row n+1 must be "Out"

    I would welcome any help! Thanks so much in advance!
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2411
    Posts
    13,587

    Re: Matching criteria in different rows

    1. Matching "Activity Number" must be in row n+1.
    2. "Activity" in row n must be "Open", while "Close" in row n+1.
    3. "Position" in row n must be of non-numeric value.
    4. "Unit" in row n must match that in Worksheet A.
    5. "In/Out" in row n+1 must be "Out"
    Hello pxtan and welcome to the forum.

    Is it possible that criteria #3 is a typo?

    There are no non-numeric in "Position" that meet the rest of the criteria, but the anticipated return in SheetA!C3 is 300. Unless you mean non-numeric in row n-1 Even then all In/Out (n and n+1) for non-numeric Position are "In"

    Can you fill us in?

    By-the-way pxtan ... this is a cross post

    http://www.mrexcel.com/forum/excel-q...rent-rows.html

    Please read up on the forum rules before a Mod comes along and "scolds" you.
    Last edited by FlameRetired; 04-21-2016 at 12:31 AM.
    Dave

  3. #3
    Registered User
    Join Date
    04-19-2016
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    2

    Re: Matching criteria in different rows

    Hi Dave,

    Sorry, I meant having non-numeric values for "Position" in row n+1.

    I was urgently requiring a solution to this, hence the cross post in different forums- will take note next time, sorry about that!

    Anyway, a solution was kindly provided (which worked) in MrExcel: http://www.mrexcel.com/forum/excel-q...rent-rows.html

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2411
    Posts
    13,587

    Re: Matching criteria in different rows

    Glad you found your solution.

    In the future while we prefer you don't cross-post, if you do please mention that in your thread and provide a link to it like you did above.

+ 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. Copying partial rows with matching criteria using VBA
    By Ezzard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2015, 02:18 PM
  2. [SOLVED] matching rows based on 2 criteria
    By stribor40 in forum Excel General
    Replies: 11
    Last Post: 09-10-2014, 10:25 PM
  3. [SOLVED] Linest of rows matching criteria
    By RodGob in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2013, 05:50 AM
  4. [SOLVED] Hide rows not matching criteria
    By Hello Shell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2013, 11:23 PM
  5. delete rows not matching certain criteria
    By sanketgroup in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2011, 04:04 PM
  6. Lookup criteria matching in rows and columns
    By JuJuBe in forum Excel General
    Replies: 2
    Last Post: 05-20-2010, 05:03 PM
  7. Identify rows matching certain criteria
    By Daz783 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-13-2010, 10:04 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