Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Filtered list code (changing criteria)

The initial code works fine. I have simply changed the criteria.
I played around with the following however, i have been unsuccessful.
I need to change the following formula to reflect the new criteria.

Old criteria:
Filter everything in column A beginning with row 12 and place it in
column B (a single instance list) starting with row 12.

New criteria:
Filter everything in column F beginning with row 17 and place it in
column Q (a single instance list) starting with row 17.

Any advice?


Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRow As Long
If Target.Cells.Count 1 Then Exit Sub
If Target.Column < 1 Then Exit Sub
Application.EnableEvents = False
If Application.CountIf(Range("B:B"), Target.Value) = 0 Then
rw = Range("B65536").End(xlUp)(2).Row
If rw < 12 Then rw = 12
Cells(rw, 2).Value = Target.Value
End If
For myRow = Range("B65536").End(xlUp).Row To 12 Step -1
If IsError(Application.Match(Cells(myRow, 2).Value, Range("A:A"),
False)) Then
Cells(myRow, 2).ClearContents
End If
Next myRow
Application.EnableEvents = True
End Sub

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
Query criteria based on a changing criteria list bwilk77 Excel Discussion (Misc queries) 2 May 27th 09 04:03 PM
several links to filtered list each with differenct criteria David_GH New Users to Excel 1 February 6th 08 08:59 PM
Dropdown list width changing code XXL User Excel Worksheet Functions 1 June 26th 06 09:11 PM
Changing visible (filtered) cells Edwin Niemoller Excel Programming 3 June 9th 05 08:30 PM
Changing filtered cells Charley Kyd[_2_] Excel Programming 9 March 7th 04 04:56 AM


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