Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
RKS RKS is offline
external usenet poster
 
Posts: 63
Default filter with condition

how can filter data with condition.
i have data like this
A B C D
1 a 10
2 b 20
3 c 10
4 d 40
5 e 10

when I enter any nos in D1 cell, my sheet filter (advance filter) with
condition like d1
result
A B C D
1 a 10
3 c 10
5 e 10
like this

RKS

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default filter with condition

In C1 enter

=B1=$D$1

copy down and filter on column C

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"RKS" wrote in message
...
how can filter data with condition.
i have data like this
A B C D
1 a 10
2 b 20
3 c 10
4 d 40
5 e 10

when I enter any nos in D1 cell, my sheet filter (advance filter) with
condition like d1
result
A B C D
1 a 10
3 c 10
5 e 10
like this

RKS



  #3   Report Post  
Posted to microsoft.public.excel.misc
RKS RKS is offline
external usenet poster
 
Posts: 63
Default filter with condition

thanks Bob for reply
but when i can change c1 value its not automatically filter. i need when i
can change c1 value its automatically filter.

please help me
RKS


"Bob Phillips" wrote:

In C1 enter

=B1=$D$1

copy down and filter on column C

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"RKS" wrote in message
...
how can filter data with condition.
i have data like this
A B C D
1 a 10
2 b 20
3 c 10
4 d 40
5 e 10

when I enter any nos in D1 cell, my sheet filter (advance filter) with
condition like d1
result
A B C D
1 a 10
3 c 10
5 e 10
like this

RKS




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default filter with condition

How about this

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "D1" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
If Me.AutoFilterMode Then Me.Cells.AutoFilter
If Target.Value < "" Then
Me.Columns(2).AutoFilter field:=1, Criteria1:=Target.Value
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"RKS" wrote in message
...
thanks Bob for reply
but when i can change c1 value its not automatically filter. i need when i
can change c1 value its automatically filter.

please help me
RKS


"Bob Phillips" wrote:

In C1 enter

=B1=$D$1

copy down and filter on column C

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"RKS" wrote in message
...
how can filter data with condition.
i have data like this
A B C D
1 a 10
2 b 20
3 c 10
4 d 40
5 e 10

when I enter any nos in D1 cell, my sheet filter (advance filter) with
condition like d1
result
A B C D
1 a 10
3 c 10
5 e 10
like this

RKS






  #5   Report Post  
Posted to microsoft.public.excel.misc
RKS RKS is offline
external usenet poster
 
Posts: 63
Default filter with condition

Hi Bob

Its not working
pl give me other solution

RKS


How about this

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "D1" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
If Me.AutoFilterMode Then Me.Cells.AutoFilter
If Target.Value < "" Then
Me.Columns(2).AutoFilter field:=1, Criteria1:=Target.Value
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"RKS" wrote in message
...
thanks Bob for reply
but when i can change c1 value its not automatically filter. i need when i
can change c1 value its automatically filter.

please help me
RKS


"Bob Phillips" wrote:

In C1 enter

=B1=$D$1

copy down and filter on column C

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"RKS" wrote in message
...
how can filter data with condition.
i have data like this
A B C D
1 a 10
2 b 20
3 c 10
4 d 40
5 e 10

when I enter any nos in D1 cell, my sheet filter (advance filter) with
condition like d1
result
A B C D
1 a 10
3 c 10
5 e 10
like this

RKS









  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default filter with condition

Tad more info, and a tad less insistence?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"RKS" wrote in message
...
Hi Bob

Its not working
pl give me other solution

RKS


How about this

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "D1" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
If Me.AutoFilterMode Then Me.Cells.AutoFilter
If Target.Value < "" Then
Me.Columns(2).AutoFilter field:=1, Criteria1:=Target.Value
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"RKS" wrote in message
...
thanks Bob for reply
but when i can change c1 value its not automatically filter. i need
when i
can change c1 value its automatically filter.

please help me
RKS


"Bob Phillips" wrote:

In C1 enter

=B1=$D$1

copy down and filter on column C

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"RKS" wrote in message
...
how can filter data with condition.
i have data like this
A B C D
1 a 10
2 b 20
3 c 10
4 d 40
5 e 10

when I enter any nos in D1 cell, my sheet filter (advance filter)
with
condition like d1
result
A B C D
1 a 10
3 c 10
5 e 10
like this

RKS









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
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
Filter Condition Fred Davis Excel Discussion (Misc queries) 2 September 14th 07 11:56 AM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
Condition 1 overules condition 2? Bultgren Excel Worksheet Functions 2 January 20th 06 12:29 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"