+ Reply to Thread
Results 1 to 3 of 3

Filter in place question for sort of unique records

  1. #1
    a
    Guest

    Filter in place question for sort of unique records

    Hello,

    I know that this should be simple - but I'm not sure how to get the
    results I want.

    I want the unique record to be from one column - but if the data in the
    next column is not unique - I still want it to only consider the
    uniqueness of the first column.

    For instance - if I want select only one vendor - but the column next to
    the vendor has a different PO number, I don't want it to show me all the
    records for the particular vendor - I only want it to show me the
    information on the one vendor - without bringing along the instance of
    the vendor when it has a different PO.

    Any help would be appreciated. Following is a lame sample.

    Sub Try()


    Dim myVariable
    myVariable = InputBox("Choose your contract", "contract", "Mentor")
    Range("d2").Value = myVariable
    Columns("A:A").Select
    Range("A1:b7").AdvancedFilter Action:=xlFilterCopy,
    CriteriaRange:=Range( _
    "D1:D2"), CopyToRange:=Range("F1:g1"), Unique:=True
    End Sub


  2. #2
    OJ
    Guest

    Re: Filter in place question for sort of unique records

    Hi,
    Post what is in your criteria range.

    OJ


  3. #3
    a
    Guest

    Re: Filter in place question for sort of unique records


    OJ,

    I'm not quite sure what you mean. The criteria range is a header - call
    it vendor - and then the variable that the user selects - the default
    being "Mentor". Is this what you mean?

    Anita


    > Hi,
    > Post what is in your criteria range.
    >
    > OJ
    >







    Hello,

    I know that this should be simple - but I'm not sure how to get the
    results I want.

    I want the unique record to be from one column - but if the data in the
    next column is not unique - I still want it to only consider the
    uniqueness of the first column.

    For instance - if I want select only one vendor - but the column next to
    the vendor has a different PO number, I don't want it to show me all the
    records for the particular vendor - I only want it to show me the
    information on the one vendor - without bringing along the instance of
    the vendor when it has a different PO.

    Any help would be appreciated. Following is a lame sample.

    Sub Try()


    Dim myVariable
    myVariable = InputBox("Choose your contract", "contract", "Mentor")
    Range("d2").Value = myVariable
    Columns("A:A").Select
    Range("A1:b7").AdvancedFilter Action:=xlFilterCopy,
    CriteriaRange:=Range( _
    "D1:D2"), CopyToRange:=Range("F1:g1"), Unique:=True
    End Sub


    OJ wrote:



+ 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