Set myxl = createobject("excel.application")
myxl.Application.Visible = true
myxl.Workbooks.Open "C:\Documents and Settings\pavann\Desktop\qtp15"
'This is the name of Sheet in Excel file "qtp15.xls" where data needs to be entered
set mysheet = myxl.ActiveWorkbook.Worksheets("Sheet1")
'Select the used range in particular sheet
With mysheet.UsedRange
' Data "PAVAN" to search
' Loop through the used range
For each search_data in mysheet.UsedRange
' compare with the expected data
If search_data="PAVAN" then
'make the cell with color if it finds the data search_data.Interior.ColorIndex = 10
End If
next
End With
myxl.ActiveWorkbook.Save
myxl.ActiveWorkbook.Close
myxl.Application.Quit
Set mysheet =nothing
Set myxl = nothing
-- Pavankumar Nandagiri