PC Review


Reply
Thread Tools Rate Thread

another filtering question

 
 
Bradly
Guest
Posts: n/a
 
      7th Jun 2010
I was assisted with the following code, which filters two pieces of data--a
case manager ID (###A from column B) and a program code (MA from column C):

Sheets("Office").Activate
Application.ScreenUpdating = False
With Sheets("Office")
.Activate
.Range("A1").Select
.Range("B1:C1000").AutoFilter Field:=1, Criteria1:="115A"
.Range("B1:C1000").AutoFilter Field:=2, Criteria1:="MA"
.Range("A1:M" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells( _
xlCellTypeVisible).Copy Destination:=Worksheets("115A").Range("A3")
.AutoFilterMode = False
End With


Sheets("115A").Activate
Application.Goto Reference:="R1C1"
Application.ScreenUpdating = True

Is there any way to filter additional data in different columns? I wanted
to ask if it was possible to modify the above code to also filter 3rd and 4th
pieces of data (program types "F" and "P", both in column D).

Thanks.

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      7th Jun 2010
Just record a macro while doing so you can see what is happening and then
modify existing macro.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Bradly" <(E-Mail Removed)> wrote in message
news:B2272D7B-1585-4C8D-9CE6-(E-Mail Removed)...
>I was assisted with the following code, which filters two pieces of data--a
> case manager ID (###A from column B) and a program code (MA from column
> C):
>
> Sheets("Office").Activate
> Application.ScreenUpdating = False
> With Sheets("Office")
> .Activate
> .Range("A1").Select
> .Range("B1:C1000").AutoFilter Field:=1, Criteria1:="115A"
> .Range("B1:C1000").AutoFilter Field:=2, Criteria1:="MA"
> .Range("A1:M" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells( _
> xlCellTypeVisible).Copy Destination:=Worksheets("115A").Range("A3")
> .AutoFilterMode = False
> End With
>
>
> Sheets("115A").Activate
> Application.Goto Reference:="R1C1"
> Application.ScreenUpdating = True
>
> Is there any way to filter additional data in different columns? I wanted
> to ask if it was possible to modify the above code to also filter 3rd and
> 4th
> pieces of data (program types "F" and "P", both in column D).
>
> Thanks.
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
filtering question dwake Microsoft Excel Misc 2 6th Sep 2008 02:39 AM
Filtering question =?Utf-8?B?VEx1ZWJrZQ==?= Microsoft Access Form Coding 1 4th May 2005 03:20 PM
TCP/IP Filtering Question =?Utf-8?B?TWFyY3Vz?= Microsoft Windows 2000 Networking 12 1st Feb 2005 04:17 AM
Question about TCP/IP filtering Gary Windows XP Embedded 4 14th Oct 2003 08:21 PM
Filtering Question Chaster Microsoft Access Forms 1 15th Jul 2003 01:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:17 AM.