Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Advance Filter

Hi All,

I have excel file. I am doing some filtering.

in Column A i have more than 1000 rows, with more than 100 unique
values.

I want to deselect some of the values, say 4 items. In excel i can do
it only two item with available option.

In VBA i got few codes which select the more than two item in the
filter.

here's my code

Dim Sht As Worksheet
Dim Crt(0 To 2) As String
Set Sht = ActiveSheet

Crt(0) = "A"
Crt(1) = "B"
Crt(2) = "C"

Sht.UsedRange.AutoFilter Field:=1, Criteria1:=Crt,
Operator:=xlFilterValues

The above code filters only "A", "B" & "C" values.....

My question : is there any option to deselect only "A", "B",
"C"....???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Advance Filter

On Jun 25, 5:15*am, "fi.or.jp.de" wrote:
Hi All,

I have excel file. I am doing some filtering.

in Column A i have more than 1000 rows, with more than 100 unique
values.

I want to deselect some of the values, say 4 items. In excel i can do
it only two item with available option.

In VBA i got few codes which select the more than two item in the
filter.

here's my code

Dim Sht As Worksheet
Dim Crt(0 To 2) As String
Set Sht = ActiveSheet

Crt(0) = "A"
Crt(1) = "B"
Crt(2) = "C"

Sht.UsedRange.AutoFilter Field:=1, Criteria1:=Crt,
Operator:=xlFilterValues

The above code filters only "A", "B" & "C" values.....

My question : is there any option to deselect only "A", "B",
"C"....???

???
<
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Advance Filter

On Jun 25, 8:53*pm, Don Guillett wrote:
On Jun 25, 5:15*am, "fi.or.jp.de" wrote:







Hi All,


I have excel file. I am doing some filtering.


in Column A i have more than 1000 rows, with more than 100 unique
values.


I want to deselect some of the values, say 4 items. In excel i can do
it only two item with available option.


In VBA i got few codes which select the more than two item in the
filter.


here's my code


Dim Sht As Worksheet
Dim Crt(0 To 2) As String
Set Sht = ActiveSheet


Crt(0) = "A"
Crt(1) = "B"
Crt(2) = "C"


Sht.UsedRange.AutoFilter Field:=1, Criteria1:=Crt,
Operator:=xlFilterValues


The above code filters only "A", "B" & "C" values.....


My question : is there any option to deselect only "A", "B",
"C"....???


???
<



Hi Don, I didn't get your answer

I know the possible ways, using helper column ( input formula
=if(or(a2="A",a2="b",a2="c"),"Deselect","select" )
OR
I can use the Advance Filter with Criteria.

But i am looking for why i am not able input use "<" in my code to
get the desired result.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Advance Filter

It happens that fi.or.jp.de formulated :
On Jun 25, 8:53*pm, Don Guillett wrote:
On Jun 25, 5:15*am, "fi.or.jp.de" wrote:







Hi All,


I have excel file. I am doing some filtering.
in Column A i have more than 1000 rows, with more than 100 unique
values.


I want to deselect some of the values, say 4 items. In excel i can do
it only two item with available option.
In VBA i got few codes which select the more than two item in the
filter.


here's my code


Dim Sht As Worksheet
Dim Crt(0 To 2) As String
Set Sht = ActiveSheet


Crt(0) = "A"
Crt(1) = "B"
Crt(2) = "C"


Sht.UsedRange.AutoFilter Field:=1, Criteria1:=Crt,
Operator:=xlFilterValues


The above code filters only "A", "B" & "C" values.....
My question : is there any option to deselect only "A", "B",
"C"....???


???
<



Hi Don, I didn't get your answer

I know the possible ways, using helper column ( input formula
=if(or(a2="A",a2="b",a2="c"),"Deselect","select" )
OR
I can use the Advance Filter with Criteria.

But i am looking for why i am not able input use "<" in my code to
get the desired result.


I believe Don is suggesting to use the 'NOT' operator as follows...

Crt(0) = "<A"
Crt(1) = "<B"
Crt(2) = "<C"

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Advance Filter

On Jun 25, 11:21*pm, GS wrote:
It happens that fi.or.jp.de formulated :









On Jun 25, 8:53*pm, Don Guillett wrote:
On Jun 25, 5:15*am, "fi.or.jp.de" wrote:


Hi All,


I have excel file. I am doing some filtering.
in Column A i have more than 1000 rows, with more than 100 unique
values.


I want to deselect some of the values, say 4 items. In excel i can do
it only two item with available option.
In VBA i got few codes which select the more than two item in the
filter.


here's my code


Dim Sht As Worksheet
Dim Crt(0 To 2) As String
Set Sht = ActiveSheet


Crt(0) = "A"
Crt(1) = "B"
Crt(2) = "C"


Sht.UsedRange.AutoFilter Field:=1, Criteria1:=Crt,
Operator:=xlFilterValues


The above code filters only "A", "B" & "C" values.....
My question : is there any option to deselect only "A", "B",
"C"....???


???
<


Hi Don, I didn't get your answer


I know the possible ways, using helper column ( input formula
=if(or(a2="A",a2="b",a2="c"),"Deselect","select" )
OR
I can use the Advance Filter with Criteria.


But i am looking for why i am not able input use "<" in my code to
get the desired result.


I believe Don is suggesting to use the 'NOT' operator as follows...

* Crt(0) = "<A"
* Crt(1) = "<B"
* Crt(2) = "<C"

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc



This doesn't work, any idea..

Crt(0) = "<A"
Crt(1) = "<B"
Crt(2) = "<C"


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
Advance Filter RKS Excel Programming 5 April 2nd 08 01:58 PM
Advance Filter RKS Excel Discussion (Misc queries) 0 March 27th 08 09:41 AM
Advance filter search does not filter an exact match cfiiland Excel Programming 1 June 10th 05 12:44 PM
advance filter DANmcc Excel Discussion (Misc queries) 2 April 20th 05 10:13 PM
about advance filter Max New Users to Excel 1 December 30th 04 04:59 AM


All times are GMT +1. The time now is 04:48 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"