Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
a special filter? | Excel Discussion (Misc queries) | |||
Copy & paste special under a filter | Excel Discussion (Misc queries) | |||
Web query and special characters | Excel Programming | |||
filter with special forrmating | Excel Programming | |||
Web query and special characters | Excel Programming |