Thread: filtering
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
magix
 
Posts: n/a
Default filtering

Hi Debra,

I tried, but it's not working. In addition, I don't understand why we need
"--($A$2:$A$12=A2)".

Regards, Magix

"Debra Dalgleish" wrote in message
...
You can do this with an Advanced Filter.
Create a criteria range, with information in the following cells:

F1: Fruit
G1: Place
H1: leave this cell blank
F2: Apple
G2: NewYork
H2:

=SUMPRODUCT(--($B$2:$B$12="orange"),--($C$2:$C$12=$G$2),--($A$2:$A$12=A2))=0

Choose DataFilterAdvanced Filter
Select Copy to another location
Select your list for the list range
Select cells F1:H2 as the criteria range
Select a cell as the Copy to starting cell
Click OK

magix wrote:
Dear Guru,

I have problem with filtering process in term of coding in Excel VBA.

Here is my scenario, To make it simple, let say I have this record, and

I
would like to have list of customer
who has Apple from New York, provided that customer will not have Orange
from New York.

Cust Fruit Place
===================
111 Apple NewYork
111 Banana NewYork
222 Apple NewYork
222 Banana NewYork
222 Orange NewYork
333 Apple NewYork
555 Banana NewYork
555 Orange NewYork
666 Apple NewYork
777 Orange NewYork
777 Apple NewYork

The output I want is:

111 Apple NewYork
333 Apple NewYork
666 Apple NewYork


Note: For Apple in Customer 222 and 777 are NOT selected because this
customer has ORANGE

So, what is the suitable coding to search through multiple rows for same
customer , and do filtering there based on same customer number ?

I hope you got what I mean.

Thanks.

Regards, Magix





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html