I am dealing with a list of 500 rows and 32 columns. I am trying to find one of 45 different items in any one of 4 columns. I wrote a macro that works and I have included it below. If there is a better or faster way to do this the input would be greatly appreciated. The 'List' page contains the 45 different items. The macro chooses the first item and then searches for that item on the 'Temp Page' in column J. If it finds a match it copies and moves it to the 'Transfer Data' page and then deletes the entry so that I wont get duplicates. The last little coding is to change colors of the last cell so that I can see where the entries end. The problem is that this runs through all 45 entries in column J and then I need to do the same again for columns N, Q, and T which makes it's perfomance somewhat slower than I would like. Again any assistance would be greatly appreciated and I thank everyone in advance.
-------------------------------------
For z = 1 To 45
Worksheets("List").Select
Range("A" & z).Select
MyDat2 = Range("A" & z)
If MyDat2 <> "" Then
For a = 1 To 250
Worksheets("Temp Page").Select
With Worksheets("Temp Page")
If Range("A" & a) <> "" Then
If Range("J" & a) = MyDat2 Then
Range("A" & a, "T" & a).Copy
Sheets("Transfer Data").Select
Range("A" & b).Select
ActiveSheet.Paste
b = b + 1
Sheets("Temp Page").Select
Range("A" & a, "L" & a).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End If
End If
End With
Next a
End If
Next z
Worksheets("Transfer Data").Select
Range("A" & b - 1).Select
With Selection.Interior
.ColorIndex = 11
.Pattern = xlSolid
End With
-------------------------------------
For z = 1 To 45
Worksheets("List").Select
Range("A" & z).Select
MyDat2 = Range("A" & z)
If MyDat2 <> "" Then
For a = 1 To 250
Worksheets("Temp Page").Select
With Worksheets("Temp Page")
If Range("A" & a) <> "" Then
If Range("J" & a) = MyDat2 Then
Range("A" & a, "T" & a).Copy
Sheets("Transfer Data").Select
Range("A" & b).Select
ActiveSheet.Paste
b = b + 1
Sheets("Temp Page").Select
Range("A" & a, "L" & a).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End If
End If
End With
Next a
End If
Next z
Worksheets("Transfer Data").Select
Range("A" & b - 1).Select
With Selection.Interior
.ColorIndex = 11
.Pattern = xlSolid
End With