Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Searching from one list in another
I have a workbook which has one tab (“Shortlist”) with about 150 rows of
data, and a tab (“Longlist”) with about 20,000 rows of data. I need to be able to select a column in Shortlist and a column in Longlist (which I would do manually), then do the following: - for each row in the Longlist column, - compare the cell in Longlist with the whole column in Shortlist, - if the cell in Longlist does NOT match any cell in the corresponding column in Shortlist, hide the row in Longlist, - go down to the next row. I am using XL2000 in XP, and I have managed to produce this so far, adapting code I have found elsewhere. Sub Hide_Rows() Dim R As Long Dim rng As Range Application.ScreenUpdating = False If Selection.Rows.Count 1 Then Set rng = Selection Else Set rng = ActiveSheet.UsedRange.Rows End If For R = rng.Rows.count To 1 Step -1 ‘If [This is the problem area] Then rng.Rows(R).EntireRow.Hide End If Next R Application.ScreenUpdating = True End Sub I would appreciate any suggestions. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Searching A List | Excel Worksheet Functions | |||
searching for a word(s) within a list | Excel Discussion (Misc queries) | |||
Searching for a contact without going through the whole list. | Excel Worksheet Functions | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
searching within list | Excel Discussion (Misc queries) |