+ Reply to Thread
Results 1 to 5 of 5

Data sorting using two column with same criteria

  1. #1
    Forum Contributor
    Join Date
    06-11-2008
    MS-Off Ver
    2003
    Posts
    220

    Data sorting using two column with same criteria

    Please see attached.

    I have tried using the advanced auto filter but im having no joy.

    In columns G and H there are numbers ranging from 0-2, i want to be able to sort both columns with same criteria so that if there is a number greater than 0 in either column than all rows should be shown

    For example:

    G H
    1 0
    2 0
    1 1
    2 0
    0 0
    0 0

    So if you filtered the above i want to be able to see all of the rows except the last two as they both have zero's.

    thanks for your help!!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-19-2008
    Posts
    56

    Re: Data sorting using two column with same criteria

    Quickest way could be to use custom filter on each column (custom, is greater than 0)

  3. #3
    Forum Contributor
    Join Date
    06-11-2008
    MS-Off Ver
    2003
    Posts
    220

    Re: Data sorting using two column with same criteria

    Unfortunatly i have tried that and it only leaves me with rows which have a number greater than zero in both columns

    so going back to my original example below it only shows me one row which is the row with both 1's in column G and H, where i want to be able to see every row except the last two. It doesnt matter that there is a zero in G and a Number in column H or visa versa, i want to see it. Its only when both columns are showing zero i dont want to see them.

    G H
    1 0
    2 0
    1 1
    2 0
    0 0
    0 0

    Thanks again.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Data sorting using two column with same criteria

    To use an AutoFilter to accomplish this, you would need to add another column to your data to give you a key. In that column would be a formula that tested both G and H on that row for values greater than 0. Something like:

    =OR(G2>0,H2>0)

    ....copied down that column...then you filter that new column based on the values that are TRUE.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    05-19-2008
    Posts
    56

    Re: Data sorting using two column with same criteria

    Quote Originally Posted by dandavis1 View Post
    Unfortunatly i have tried that and it only leaves me with rows which have a number greater than zero in both columns

    so going back to my original example below it only shows me one row which is the row with both 1's in column G and H, where i want to be able to see every row except the last two. It doesnt matter that there is a zero in G and a Number in column H or visa versa, i want to see it. Its only when both columns are showing zero i dont want to see them.

    G H
    1 0
    2 0
    1 1
    2 0
    0 0
    0 0

    Thanks again.
    Sorry wasn't thinking straight

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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