Custom Search

Wednesday, October 3, 2012

How to verify some text in Excel which is having large number of data

Set xl=CreateObject("Excel.Application")
xl.Workbooks.Open "C:\Test.xlsx"
Set r = xl.Range("A1:N20").Find("kamesh")
If r Is Nothing Then
xl.Cells(1,1).Value= "not found"
Else
xl.Cells(1,1).Value= "found"
End If
xl.quit
set xl=nothing

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.