PC Review


Reply
Thread Tools Rate Thread

How do I do simultaneous AND and OR filtering ?

 
 
=?Utf-8?B?TW90b3duIE1pY2s=?=
Guest
Posts: n/a
 
      19th Aug 2007
I would like to do a filtering operation that is a combination of an AND
command and an OR command. In other words, I have a worksheet consisting of
data in say, columns A, B, and C that I am requiring to be greater than zero.
In another set of columns in the worksheet, say columns D, E, and F, I am
requiring AT LEAST ONE of the entries to be greater than zero. So
intuitively, the command structure would be something like =AND (A2>0, B2>0,
C2>0) OR(D2>0, E2>0, F2>0), but I am not sure of the exact command syntax one
would need to do the two things simultaneously.

I plan to do this in a column with the heading “FILTER”. It is my hope that
by writing in the correct command structure, and filtering for “TRUE”, I will
be able to filter for all the rows that are completely free of non-zero
entries in A, B, and C, and have at least one entry greater than zero in D,
E, or F. Can anybody suggest the correct way to proceed?

I plan to copy these filtered results into another worksheet. One thing I
would like to know about filtering is when Excel does this, is it just like
taking a photograph of the rows you have specified in the worksheet as they
are, or does Excel do any formula recalculation based on the fractured and
fragmented worksheet that now appears? In other words, this worksheet has a
lot of operations I’ve performed on it that are commands based on a range
reference, such as VLOOKUP, SUMIF/(COUNTIF, and IF(ISNA(MATCH. I hope that
when I do the filtering, Excel does not recalculate the values based on the
fractured and fragmented ranges that appear "ex post facto" after the
filtering has taken place. That would distort the results, and lead to
errors and misinformation. Are there any precautions I must take to ensure
that when I do the filtering, Excel copies the values as they are, and does
not make any formula recalculations based on the fractured and fragmented
range designations?

Mick

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      19th Aug 2007
You're pretty close:
=AND (A2>0, B2>0, C2>0, OR(D2>0, E2>0, F2>0))

Recalculation should not affect your data, the rows are only hidden so your
formula references won't change (unless your formulae use Subtotal, which
excludes rows hidden by a filter). When you paste the filtered data to a new
sheet, my experience has always been XL will paste the values, not the
formulae - so your pasted data will be a "snapshot".


"Motown Mick" wrote:

> I would like to do a filtering operation that is a combination of an AND
> command and an OR command. In other words, I have a worksheet consisting of
> data in say, columns A, B, and C that I am requiring to be greater than zero.
> In another set of columns in the worksheet, say columns D, E, and F, I am
> requiring AT LEAST ONE of the entries to be greater than zero. So
> intuitively, the command structure would be something like =AND (A2>0, B2>0,
> C2>0) OR(D2>0, E2>0, F2>0), but I am not sure of the exact command syntax one
> would need to do the two things simultaneously.
>
> I plan to do this in a column with the heading “FILTER”. It is my hope that
> by writing in the correct command structure, and filtering for “TRUE”, I will
> be able to filter for all the rows that are completely free of non-zero
> entries in A, B, and C, and have at least one entry greater than zero in D,
> E, or F. Can anybody suggest the correct way to proceed?
>
> I plan to copy these filtered results into another worksheet. One thing I
> would like to know about filtering is when Excel does this, is it just like
> taking a photograph of the rows you have specified in the worksheet as they
> are, or does Excel do any formula recalculation based on the fractured and
> fragmented worksheet that now appears? In other words, this worksheet has a
> lot of operations I’ve performed on it that are commands based on a range
> reference, such as VLOOKUP, SUMIF/(COUNTIF, and IF(ISNA(MATCH. I hope that
> when I do the filtering, Excel does not recalculate the values based on the
> fractured and fragmented ranges that appear "ex post facto" after the
> filtering has taken place. That would distort the results, and lead to
> errors and misinformation. Are there any precautions I must take to ensure
> that when I do the filtering, Excel copies the values as they are, and does
> not make any formula recalculations based on the fractured and fragmented
> range designations?
>
> Mick
>

 
Reply With Quote
 
=?Utf-8?B?TW90b3duIE1pY2s=?=
Guest
Posts: n/a
 
      20th Aug 2007
Dear JMB:

Thanks, that worked fabulously! I checked for distortions in the column
where I had the results of a SUMIF/(COUNTIF copied and dragged down the
entire worksheet as far as there was data, and the numbers were identical in
the filtered and non-filtered worksheets. If the range field had been broken
up, and XL had recalculated, there surely would have been variation, which
there wasn't.

Thanks again for your help!

Mick

"JMB" wrote:

> You're pretty close:
> =AND (A2>0, B2>0, C2>0, OR(D2>0, E2>0, F2>0))
>
> Recalculation should not affect your data, the rows are only hidden so your
> formula references won't change (unless your formulae use Subtotal, which
> excludes rows hidden by a filter). When you paste the filtered data to a new
> sheet, my experience has always been XL will paste the values, not the
> formulae - so your pasted data will be a "snapshot".
>
>
> "Motown Mick" wrote:
>
> > I would like to do a filtering operation that is a combination of an AND
> > command and an OR command. In other words, I have a worksheet consisting of
> > data in say, columns A, B, and C that I am requiring to be greater than zero.
> > In another set of columns in the worksheet, say columns D, E, and F, I am
> > requiring AT LEAST ONE of the entries to be greater than zero. So
> > intuitively, the command structure would be something like =AND (A2>0, B2>0,
> > C2>0) OR(D2>0, E2>0, F2>0), but I am not sure of the exact command syntax one
> > would need to do the two things simultaneously.
> >
> > I plan to do this in a column with the heading “FILTER”. It is my hope that
> > by writing in the correct command structure, and filtering for “TRUE”, I will
> > be able to filter for all the rows that are completely free of non-zero
> > entries in A, B, and C, and have at least one entry greater than zero in D,
> > E, or F. Can anybody suggest the correct way to proceed?
> >
> > I plan to copy these filtered results into another worksheet. One thing I
> > would like to know about filtering is when Excel does this, is it just like
> > taking a photograph of the rows you have specified in the worksheet as they
> > are, or does Excel do any formula recalculation based on the fractured and
> > fragmented worksheet that now appears? In other words, this worksheet has a
> > lot of operations I’ve performed on it that are commands based on a range
> > reference, such as VLOOKUP, SUMIF/(COUNTIF, and IF(ISNA(MATCH. I hope that
> > when I do the filtering, Excel does not recalculate the values based on the
> > fractured and fragmented ranges that appear "ex post facto" after the
> > filtering has taken place. That would distort the results, and lead to
> > errors and misinformation. Are there any precautions I must take to ensure
> > that when I do the filtering, Excel copies the values as they are, and does
> > not make any formula recalculations based on the fractured and fragmented
> > range designations?
> >
> > Mick
> >

 
Reply With Quote
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      21st Aug 2007
Glad that worked for you. Thanks for the feedback!

"Motown Mick" wrote:

> Dear JMB:
>
> Thanks, that worked fabulously! I checked for distortions in the column
> where I had the results of a SUMIF/(COUNTIF copied and dragged down the
> entire worksheet as far as there was data, and the numbers were identical in
> the filtered and non-filtered worksheets. If the range field had been broken
> up, and XL had recalculated, there surely would have been variation, which
> there wasn't.
>
> Thanks again for your help!
>
> Mick
>
> "JMB" wrote:
>
> > You're pretty close:
> > =AND (A2>0, B2>0, C2>0, OR(D2>0, E2>0, F2>0))
> >
> > Recalculation should not affect your data, the rows are only hidden so your
> > formula references won't change (unless your formulae use Subtotal, which
> > excludes rows hidden by a filter). When you paste the filtered data to a new
> > sheet, my experience has always been XL will paste the values, not the
> > formulae - so your pasted data will be a "snapshot".
> >
> >
> > "Motown Mick" wrote:
> >
> > > I would like to do a filtering operation that is a combination of an AND
> > > command and an OR command. In other words, I have a worksheet consisting of
> > > data in say, columns A, B, and C that I am requiring to be greater than zero.
> > > In another set of columns in the worksheet, say columns D, E, and F, I am
> > > requiring AT LEAST ONE of the entries to be greater than zero. So
> > > intuitively, the command structure would be something like =AND (A2>0, B2>0,
> > > C2>0) OR(D2>0, E2>0, F2>0), but I am not sure of the exact command syntax one
> > > would need to do the two things simultaneously.
> > >
> > > I plan to do this in a column with the heading “FILTER”. It is my hope that
> > > by writing in the correct command structure, and filtering for “TRUE”, I will
> > > be able to filter for all the rows that are completely free of non-zero
> > > entries in A, B, and C, and have at least one entry greater than zero in D,
> > > E, or F. Can anybody suggest the correct way to proceed?
> > >
> > > I plan to copy these filtered results into another worksheet. One thing I
> > > would like to know about filtering is when Excel does this, is it just like
> > > taking a photograph of the rows you have specified in the worksheet as they
> > > are, or does Excel do any formula recalculation based on the fractured and
> > > fragmented worksheet that now appears? In other words, this worksheet has a
> > > lot of operations I’ve performed on it that are commands based on a range
> > > reference, such as VLOOKUP, SUMIF/(COUNTIF, and IF(ISNA(MATCH. I hope that
> > > when I do the filtering, Excel does not recalculate the values based on the
> > > fractured and fragmented ranges that appear "ex post facto" after the
> > > filtering has taken place. That would distort the results, and lead to
> > > errors and misinformation. Are there any precautions I must take to ensure
> > > that when I do the filtering, Excel copies the values as they are, and does
> > > not make any formula recalculations based on the fractured and fragmented
> > > range designations?
> > >
> > > Mick
> > >

 
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 records by filtering information on diffrent tables. Ironr4ge Microsoft Access Forms 0 6th Jul 2007 02:12 PM
Simultaneous Filtering =?Utf-8?B?TWlrZQ==?= Microsoft Excel Worksheet Functions 3 25th Jul 2006 08:21 AM
Outlook 2003 Junk filter not filtering SPAM, filtering items from =?Utf-8?B?S3lsZSBPcnI=?= Microsoft Outlook Discussion 0 26th Apr 2006 07:13 PM
trouble filtering a list. Why isn't column filtering? =?Utf-8?B?UGF0?= Microsoft Excel Worksheet Functions 1 18th Jul 2005 03:30 PM
Re: Spam filtering tools - Bayesian filtering Aaron Freeware 17 30th Sep 2003 08:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:45 PM.