Filter for 'Last Month' AND other criteria in same column

  • Hi, how do I add to the below 'Last Month' code to also filter for "Yes" in the same column.

    Code
    Range("A1").AutoFilter Field:=10, Criteria1:=xlFilterLastMonth, Operator:=xlFilterDynamic 
  • You can't do that, manually or in code. You would need to use an additional formula column, or an advanced filter. You could also create an array of all of last month's values plus "Yes" and filter for that.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!