ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Advanced Filters - 'or' function (https://www.excelbanter.com/excel-discussion-misc-queries/139076-advanced-filters-function.html)

Louise

Advanced Filters - 'or' function
 
I have a large worksheet and wish to perform an advanced filter on the data.

Can anybody tell me if you can create a single advanced filter which will
look for data in two columns using the 'or' function. For instance, to
filter out those records with a value of greater than 5 in column C 'or' a
value greater than 5 in column D?

I can create advanced filters but have never asked it to look at multiple
values before.

Thank you.
Louise

Ron Coderre

Advanced Filters - 'or' function
 
Try this:

In the criteria range for the Advanced Filter, criteria in the same row
must ALL be met (equivalent to "AND" in SQL). Criteria in contiguous rows
are the equivalent of "OR" in SQL.

Example:
This criteria indicates that only items with Val15 OR items with Val25
will be displayed.

Val1 Val2
5 (blank)

(blank) 5

Note: Implicit in that criteria is that items with BOTH Val15 and Val25
will be displayed.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Louise" wrote:

I have a large worksheet and wish to perform an advanced filter on the data.

Can anybody tell me if you can create a single advanced filter which will
look for data in two columns using the 'or' function. For instance, to
filter out those records with a value of greater than 5 in column C 'or' a
value greater than 5 in column D?

I can create advanced filters but have never asked it to look at multiple
values before.

Thank you.
Louise


Dave Peterson

Advanced Filters - 'or' function
 
Put your headers in K1:L1 (say)
In K2, put:
5

In L3 (leave L2 empty), put:
5


Debra Dalgleish explains it with pictures:
http://contextures.com/xladvfilter01.html#CriteriaRange



Louise wrote:

I have a large worksheet and wish to perform an advanced filter on the data.

Can anybody tell me if you can create a single advanced filter which will
look for data in two columns using the 'or' function. For instance, to
filter out those records with a value of greater than 5 in column C 'or' a
value greater than 5 in column D?

I can create advanced filters but have never asked it to look at multiple
values before.

Thank you.
Louise


--

Dave Peterson

Louise

Advanced Filters - 'or' function
 
Thanks very for your response.

At first glance, it seems to have worked. If we have any problems with the
data, I might need more help.......

Thanks again.
Louise

"Ron Coderre" wrote:

Try this:

In the criteria range for the Advanced Filter, criteria in the same row
must ALL be met (equivalent to "AND" in SQL). Criteria in contiguous rows
are the equivalent of "OR" in SQL.

Example:
This criteria indicates that only items with Val15 OR items with Val25
will be displayed.

Val1 Val2
5 (blank)

(blank) 5

Note: Implicit in that criteria is that items with BOTH Val15 and Val25
will be displayed.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Louise" wrote:

I have a large worksheet and wish to perform an advanced filter on the data.

Can anybody tell me if you can create a single advanced filter which will
look for data in two columns using the 'or' function. For instance, to
filter out those records with a value of greater than 5 in column C 'or' a
value greater than 5 in column D?

I can create advanced filters but have never asked it to look at multiple
values before.

Thank you.
Louise



All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com