Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Find in a range

Public Sub FindIt()   Dim aRange As Range      Set aRange = Range("A1:A12").Find(what:="Jun",LookAt:=xlWhole, LookIn:=xlValues)        If aRange Is Nothing Then     MsgBox "Data not found"     Exit Sub   Else     aRange.Resize(1, 3).Copy Destination:=Range("G1")   End If End Sub