Results 1 to 3 of 3

Thread: Filter based on two columns

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,970
    Quote Originally Posted by amir0914 View Post
    without copy or move data to another location
    On Sheet4 of the attached is a macro solution. It briefly uses cells F1:F2 as criteria for an advanced filter:
    Sub blah()
    Range("F1").ClearContents
    Range("F2").FormulaR1C1 = "=RC4>RC1"
    Range("A1").CurrentRegion.Resize(, 4).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("F1:F2")
    Range("F2").ClearContents
    End Sub
    On Sheet3 there's another solution which does update a result table in another location. Update the source data table on the left, then right-click the result table and choose Refresh.

    It really is a good idea to attach your own sample file - you'll get answers more quickly.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •