-
[VBA]Option Explicit
Sub GetData()
Dim c As Range, Nms As Range
Dim emp As Range
Dim Arr, a
Dim r As Long
Arr = Array("Julianne", "Ramero", "Allie", "Louis")
Set c = Columns(1).Find("Employee name")
Set Nms = Range(c(2), c(2).End(xlDown))
r = Cells(Rows.Count, 1).End(xlUp).Row + 4
For Each a In Arr
Nms.Find(a, lookat:=xlWhole).EntireRow.Cut Cells(r, 1)
r = r + 1
Next
Nms.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules