+ Reply to Thread
Results 1 to 14 of 14

Extract all records that match criteria in 2 columns

  1. #1
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Extract all records that match criteria in 2 columns

    Hi

    Would you please help me write the formula to extract all records that match "1" in E and are >0 in J?

    Thanks
    Attached Images Attached Images

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Extract all records that match criteria in 2 columns

    pls attach a sample excel file
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Extract all records that match criteria in 2 columns

    Here is the file requested.
    Attached Files Attached Files

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Extract all records that match criteria in 2 columns

    Please Login or Register  to view this content.
    try this formula and copy across

  5. #5
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Extract all records that match criteria in 2 columns

    Perfect!

    Of course it would be better if I can understand it ... why reference is made to column M? There is nothing there!


    Thanks
    Last edited by drgkt; 09-10-2016 at 04:43 AM.

  6. #6
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Extract all records that match criteria in 2 columns

    Would you please modify if the first criterion (match 1) would be stored in say L1 and the 2nd (0) stored in L2.

    In other words, extract all records that in column E match L1 and in column J are greater than L2

    Thanks

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Extract all records that match criteria in 2 columns

    Quote Originally Posted by drgkt View Post
    Perfect!

    Of course it would be better if I can understand it ... why reference is made to column M? There is nothing there!


    Thanks
    The
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    syntax is a commonly used way to generate an array of numbers. It doesn't mean it's using data from column M.
    When ROWS(M$1:M1) is in column M the ROWS array evaluates to 1. When copied to the next column the range is M$1:N1 and results in the array {1,2}. As it's copied across, each succeeding column contains a larger array of numbers e.g {1,2,3,4,5} in column Q.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  8. #8
    Valued Forum Contributor
    Join Date
    05-11-2013
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    586

    Re: Extract all records that match criteria in 2 columns

    Alternatively you could use filters - please see attached.

    Would this work for you?

    Regards

    peterrc
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Extract all records that match criteria in 2 columns

    I am aware of the filter solution.
    I am trying to learn /see the logic in the formula.

    In order to better understand the formula could you please modify as requested above?
    i.e.: extract all records that in column E match L1 and in column J are greater than L2

    I appreciate it.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Extract all records that match criteria in 2 columns

    Quote Originally Posted by drgkt View Post
    I am aware of the filter solution.
    I am trying to learn /see the logic in the formula.

    In order to better understand the formula could you please modify as requested above?
    i.e.: extract all records that in column E match L1 and in column J are greater than L2

    I appreciate it.
    I don't understand. Column L doesn't contain any data.

  11. #11
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Extract all records that match criteria in 2 columns

    see the attached file
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Extract all records that match criteria in 2 columns

    Quote Originally Posted by Richard Buttrey View Post
    I don't understand. Column L doesn't contain any data.
    you are right.

    I requested that be made believed that the conditions in post 1 are in L1,L2 like the file in post 11.

  13. #13
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Extract all records that match criteria in 2 columns

    @nflsales

    For argument sake, in copying the formula to right in Book2 (1).xls‎, I wonder why V3=0 while W3=""

  14. #14
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Extract all records that match criteria in 2 columns

    Quote Originally Posted by Richard Buttrey View Post
    The
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ...When copied to the next column the range is M$1:N1 ...
    When copied to the next column is N$1:N1 not M$1:N1.
    Regardless, changing the ROWS(M$1:M1) with 1 in the formula and then copying to right, does not seem to change results.

    That is why I need to understand this step by step so I can recreate it when needed instead of just pasting in this instance and ask again in another instance.

+ 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] Extract records between two dates with criteria - Gap analysis
    By bala04msw in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2016, 05:45 AM
  2. Extract records from a data sheet with name and dates criteria
    By ovgarcia24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-01-2016, 12:11 PM
  3. [SOLVED] VBA Code to Extract complete row if the criteria did not match with 4 columns
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-26-2012, 01:30 PM
  4. Extract records based on criteria
    By Amarjeet Singh in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 01-12-2009, 03:41 AM
  5. extract Unique Records from multipe columns
    By carsto in forum Excel General
    Replies: 4
    Last Post: 11-20-2007, 10:10 AM
  6. Replies: 0
    Last Post: 09-26-2006, 09:42 AM
  7. Extract multiple records matching criteria from list
    By William DeLeo in forum Excel Formulas & Functions
    Replies: 56
    Last Post: 09-06-2005, 12:05 PM

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