Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gareth
 
Posts: n/a
Default Advanced Filter criteria (formula)

I was using the following formula when filtering a sheet of data:

=OR(B2=1,AND(OR(B2=2,B2=3),L2<0,K2=0,I2=ayearago ))

It filters all rows with 1 in column B and any other rows with 2 or 3 in
column B that meet the criteria L2<0,K2=0,I2=ayearago (where ayearago is a
named cell containing a date).

I now find myself needing to change this formula to filter for all rows with
1 in column B and any other rows with 2 or 3 in column B that meet the
criteria L2<0,K2=0,I2=ayearago and L2<0,K2=thirtydaysago,I2=ayearago.

I have tried but with no success so far.

Thanks in advance.

Gareth



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Advanced Filter criteria (formula)

Hi Gareth
If I understand the problem correctly, then
=AND(OR(B20,B2<=3),OR(K2=0,K2=thirtydaysago),L2< 0,I2=ayearago)

Regards

Roger Govier


Gareth wrote:
I was using the following formula when filtering a sheet of data:

=OR(B2=1,AND(OR(B2=2,B2=3),L2<0,K2=0,I2=ayearago ))

It filters all rows with 1 in column B and any other rows with 2 or 3 in
column B that meet the criteria L2<0,K2=0,I2=ayearago (where ayearago is a
named cell containing a date).

I now find myself needing to change this formula to filter for all rows with
1 in column B and any other rows with 2 or 3 in column B that meet the
criteria L2<0,K2=0,I2=ayearago and L2<0,K2=thirtydaysago,I2=ayearago.

I have tried but with no success so far.

Thanks in advance.

Gareth



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Art Farrell
 
Posts: n/a
Default Advanced Filter criteria (formula)

Hi Gareth,

Staying with your original setup of the formula:

=OR(B2=1,AND(OR(B2=2,B2=3),L2<0,OR(K2=0,K2="thir tydaysago"),I2="ayearago"
))

Roger's formula rearranges it, but you need the B2=1, as B20 would include
values of 4 on unless I'm mistaken.

=AND(OR(B2=1,B2<=3),OR(K2=0,K2="thirtydaysago"),L 2<0,I2="ayearago")


CHORDially,
Art Farrell


"Gareth" wrote in message
...
I was using the following formula when filtering a sheet of data:

=OR(B2=1,AND(OR(B2=2,B2=3),L2<0,K2=0,I2=ayearago ))

It filters all rows with 1 in column B and any other rows with 2 or 3 in
column B that meet the criteria L2<0,K2=0,I2=ayearago (where ayearago is

a
named cell containing a date).

I now find myself needing to change this formula to filter for all rows

with
1 in column B and any other rows with 2 or 3 in column B that meet the
criteria L2<0,K2=0,I2=ayearago and L2<0,K2=thirtydaysago,I2=ayearago.

I have tried but with no success so far.

Thanks in advance.

Gareth





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Advanced Filter criteria (formula)

Hi Art

Nice catch.
You are quite right, my formula would have picked up any value in B2,
outside of the desired range.

Regards

Roger Govier


Art Farrell wrote:
Hi Gareth,

Staying with your original setup of the formula:

=OR(B2=1,AND(OR(B2=2,B2=3),L2<0,OR(K2=0,K2="thir tydaysago"),I2="ayearago"
))

Roger's formula rearranges it, but you need the B2=1, as B20 would include
values of 4 on unless I'm mistaken.

=AND(OR(B2=1,B2<=3),OR(K2=0,K2="thirtydaysago"),L 2<0,I2="ayearago")


CHORDially,
Art Farrell


"Gareth" wrote in message
...

I was using the following formula when filtering a sheet of data:

=OR(B2=1,AND(OR(B2=2,B2=3),L2<0,K2=0,I2=ayeara go))

It filters all rows with 1 in column B and any other rows with 2 or 3 in
column B that meet the criteria L2<0,K2=0,I2=ayearago (where ayearago is


a

named cell containing a date).

I now find myself needing to change this formula to filter for all rows


with

1 in column B and any other rows with 2 or 3 in column B that meet the
criteria L2<0,K2=0,I2=ayearago and L2<0,K2=thirtydaysago,I2=ayearago.

I have tried but with no success so far.

Thanks in advance.

Gareth






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
Need Advanced Filter with NOT equal string and OR criteria MK Excel Discussion (Misc queries) 5 December 7th 05 02:28 PM
Advanced Filter for exact value hari Excel Discussion (Misc queries) 2 November 10th 05 08:23 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


All times are GMT +1. The time now is 06:53 AM.

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"