Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Filter on more than one field

Hi All,

Who can tell me the command of auto filter on more than one field? I
read Ron's example (http://www.rondebruin.nl/copy5.htm#sheet) Create a
new sheet for one unique value(AutoFilter) and found that Tip's on
Filter on more than one field, but I still don't understand. Because
his example already knew the Criteria, how about if don't know the
criteria? Only want to setup 2 field and copy all unique record? I
can do it only one filter (rng.AutoFilter Field:=FieldNum,
Criteria1:="=" & cell.Value), what's code for two filter?

Ron's example:
rng.AutoFilter Field:=1, Criteria1:="=Netherlands"
rng.AutoFilter Field:=3, Criteria1:="=F"

And how can I change the command, if the header is not on the first
row (e.g. the third row) and need to copy unique record include the
first row and next to the table empty row information to new
workbook. Below is my example, I need to split by dep't with
different approval to other workbook. My data on dept over 100's depts
and each of dept have more than 2 different approval. So, I need to
split many many file, pls help me.

Below is orignal file:

Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
AC James
AC James
HR James
HR Kwok
HR Kwok

information xxx xxxxx

Output file should be look like as below:

Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
HR Kwok
HR Kwok

Another output file as below:

Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
HR James




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Filter on more than one field

On 3$B7n(B18$BF|(B, $B2<8a(B11$B;~(B59$BJ,(B, wrote:
Hi All,

Who can tell me the command of auto filter on more than one field? I
read Ron's example (http://www.rondebruin.nl/copy5.htm#sheet) Create a
new sheet for one unique value(AutoFilter) and found that Tip's on
Filter on more than one field, but I still don't understand. Because
his example already knew the Criteria, how about if don't know the
criteria? Only want to setup 2 field and copy all unique record? I
can do it only one filter (rng.AutoFilter Field:=FieldNum,
Criteria1:="=" & cell.Value), what's code for two filter?

Ron's example:
rng.AutoFilter Field:=1, Criteria1:="=Netherlands"
rng.AutoFilter Field:=3, Criteria1:="=F"

And how can I change the command, if the header is not on the first
row (e.g. the third row) and need to copy unique record include the
first row and next to the table empty row information to new
workbook. Below is my example, I need to split by dep't with
different approval to other workbook. My data on dept over 100's depts
and each of dept have more than 2 different approval. So, I need to
split many many file, pls help me.

Below is orignal file:

Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
AC James
AC James
HR James
HR Kwok
HR Kwok

information xxx xxxxx

Output file should be look like as below:

Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
HR Kwok
HR Kwok


information xxx xxxxx

Another output file as below:

Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
HR James


information xxx xxxxx


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Filter on more than one field

On 3$B7n(B19$BF|(B, $Be8a(B12$B;~(B04$BJ,(B, wrote:
On 3$B7n(B18$BF|(B, $B2<8a(B11$B;~(B59$BJ,(B, wrote:



Hi All,


Who can tell me the command of auto filter on more than one field? I
read Ron's example (http://www.rondebruin.nl/copy5.htm#sheet) Create a
new sheet for one unique value(AutoFilter) and found that Tip's on
Filter on more than one field, but I still don't understand. Because
his example already knew the Criteria, how about if don't know the
criteria? Only want to setup 2 field and copy all unique record? I
can do it only one filter (rng.AutoFilter Field:=FieldNum,
Criteria1:="=" & cell.Value), what's code for two filter?


Ron's example:
rng.AutoFilter Field:=1, Criteria1:="=Netherlands"
rng.AutoFilter Field:=3, Criteria1:="=F"


And how can I change the command, if the header is not on the first
row (e.g. the third row) and need to copy unique record include the
first row and next to the table empty row information to new
workbook. Below is my example, I need to split by dep't with
different approval to other workbook. My data on dept over 100's depts
and each of dept have more than 2 different approval. So, I need to
split many many file, pls help me.


Below is orignal file:


Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
AC James
AC James
HR James
HR Kwok
HR Kwok


information xxx xxxxx


Output file should be look like as below:


Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
HR Kwok
HR Kwok
information xxx xxxxx


Another output file as below:


Account No: 12345678
Inv date: 19/03/08
Dep't Approval header3 header4
HR James
information xxx xxxxx- $Bp,i6Ho0zMQJ8;z(B -


- $Bp}<(Ho0zMQJ8;z(B -


sorry, output file should be one empty row above on "information xxx
xxxx"
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Filter on more than one field

Any one can help me?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot charts filter field in 2007 Raja Charts and Charting in Excel 3 May 9th 08 11:18 PM
How to set the value of a filter field in a Pivot Table? Iglesias Excel Worksheet Functions 0 July 16th 07 10:16 PM
Dynamically set the value for Field in auto filter Brian C Excel Programming 1 June 20th 06 11:41 PM
How do I filter with multiple conditions in one field? TJ Excel Discussion (Misc queries) 4 September 28th 05 11:16 PM
How to filter on a date field during mail merge SWADoug Excel Worksheet Functions 0 June 21st 05 06:31 PM


All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"