Sub FindGroupSkill()
Dim wsSrc As Worksheet, wsTarg As Worksheet
Dim vSkill2Find, vSkill
Dim r As Long
Sheets("Data Entry").Activate
Set wsSrc = ActiveSheet
Sheets("Group Skills").Select
Set wsTarg = ActiveSheet
ClearTheCells
wsSrc.Activate
Range("A2").Activate
vSkill2Find = InputBox("Enter Skill to find", "Find Group skill")
If vSkill2Find = "" Then Exit Sub
While ActiveCell.Value <> ""
vSkill = ActiveCell.Offset(0, 2).Value
If LCase(vSkill) = LCase(vSkill2Find) Then
r = ActiveCell.Row
Rows(r & ":" & r).Copy
wsTarg.Activate
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Select 'next row
wsSrc.Activate
End If
ActiveCell.Offset(1, 0).Select 'next row
Wend
wsTarg.Activate
MsgBox "Done"
Set wsSrc = Nothing
Set wsTarg = Nothing
End Sub
Private Sub ClearTheCells()
Range("A2:M500").ClearContents
Range("A2").Activate
End Sub