Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have data that I past into a spread sheet that I download daily of over
1000 rows with names and data columns. I have a list of 15 people listed on this list that I need to find their records, delete the others and end up with only those 15 peoples data. What is the best way for me to accomplish this. |
#2
![]() |
|||
|
|||
![]()
Hi
You can try this one with the names in column A Enter all names in the array Array("jelle", "ron", "dave") you can also make a list on a worksheet if you want Sub Example2() Dim Lrow As Long Dim CalcMode As Long Dim StartRow As Long Dim EndRow As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With With ActiveSheet .DisplayPageBreaks = False StartRow = 1 EndRow = 1000 For Lrow = EndRow To StartRow Step -1 If IsError(.Cells(Lrow, "A").Value) Then 'Do nothing, This avoid a error if there is a error in the cell ElseIf IsError(Application.Match(.Cells(Lrow, "A").Value, _ Array("jelle", "ron", "dave"), 0)) Then .Rows(Lrow).Delete End If Next End With With Application .ScreenUpdating = True .Calculation = CalcMode End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "vanjan" wrote in message ... I have data that I past into a spread sheet that I download daily of over 1000 rows with names and data columns. I have a list of 15 people listed on this list that I need to find their records, delete the others and end up with only those 15 peoples data. What is the best way for me to accomplish this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I find a name in a list of names? | Excel Worksheet Functions | |||
Update master list with other lists | Excel Worksheet Functions | |||
How do I find data from a list (or table) and insert it in a row? | Excel Discussion (Misc queries) | |||
Find a duplicate value within a list? | Excel Worksheet Functions | |||
How do I find out what items are in one list but not in another l. | Excel Discussion (Misc queries) |