Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default special filter or query

I need a filter which will show all rows n and n+1, if and only if, in row n,
A=1 and B=1, and in row n+1, A=0, B=2 and C=4; or, in row n, A=0, B=1 and
C=4, and in row n+1, A=1 and B=2. In other words, whether or not a row is to
be displayed depends not only on what is in the row but also on what is in
the preceding row or the following row. Can you tell me how to do this?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default special filter or query

For my suggestion to work, your first row of data can NOT start in row 1.
However, row 1 CAN contain your column headers.

Assuming row 1 DOES contain column headers and row 2 is your 1st row of data:

In the first available column to the right of your data, in row 1 add the
column header "Test Column".

In row 2, immediately below the cell containing "Test Column", enter the
following formula:

=IF(OR(OR(AND(A2=1,B2=1,A3=0,B3=2,C3=4),AND(A2=0,B 2=2,C2=4,A1=1,B1=1)),OR(AND(A2=0,B2=1,C2=4,A3=1,B3 =2),AND(A2=1,B2=2,A1=0,B1=1,C1=4))),"Condition
Met","Condition Not Met")

Copy the formula down to your last row of data.

Now you should be able to apply a filter on your Test Column for all rows
that contain "Condition Met".

Good Luck


Ie, if your data DOES start in row 1, insert a row so row 1 is blank.


"tiktin" wrote:

I need a filter which will show all rows n and n+1, if and only if, in row n,
A=1 and B=1, and in row n+1, A=0, B=2 and C=4; or, in row n, A=0, B=1 and
C=4, and in row n+1, A=1 and B=2. In other words, whether or not a row is to
be displayed depends not only on what is in the row but also on what is in
the preceding row or the following row. Can you tell me how to do this?
Thanks.

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
a special filter? Luke Excel Discussion (Misc queries) 1 July 12th 07 01:23 AM
Copy & paste special under a filter Holly Excel Discussion (Misc queries) 3 November 18th 06 12:28 PM
Web query and special characters Marcelo[_10_] Excel Programming 1 March 21st 06 05:00 PM
filter with special forrmating dodo Excel Programming 2 July 10th 05 09:38 AM
Web query and special characters David Sloman Excel Programming 2 January 5th 05 08:15 AM


All times are GMT +1. The time now is 02:11 PM.

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

About Us

"It's about Microsoft Excel"