Solved

Two criterias

Posted on 2014-12-10
1
52 Views
Last Modified: 2014-12-16
Hi,

I have the below code and need to filter on two criterias, my second criteria is

Column 6 "BB"

Can someone amend the below sysntax so this filters first on Column 8 and then on Column 6

Thanks

    Cells.Select
    Selection.AutoFilter
    Cells.AutoFilter Field:=8, Criteria1:="France"

----- no I need it to filter on column 6 for "BB"
     
    Cells.Copy
    Workbooks.Add
   
 
    Range("A1").PasteSpecial
    SaveTheFile_Everything

Thanks
0
Comment
Question by:Seamus2626
1 Comment
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40491988
pls try

    Cells.Select
     Selection.AutoFilter
     Cells.AutoFilter Field:=8, Criteria1:="France"
     Cells.AutoFilter Field:=6, Criteria1:="BB"

'  ----- no I need it to filter on column 6 for "BB"
      
     Cells.Copy
     Workbooks.Add
     
   
     Range("A1").PasteSpecial
     SaveTheFile_Everything

Open in new window

Regards
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question