1.How to find in which row or column,string "Hyderabad"
exist in excel sheet?
2.How to find how many times character "a" repeated in a
given string "Koteswararao"
Answer Posted / lak
1)Find Cell data(Hyderabad)
dim obj,objwb,objsheet,search_item,found,flagrow,flagcol
Set obj=Createobject("Excel.Application")
Set objwb=obj.WorkBooks.Open("D:\Find.xls")
Set objsheet=objwb.Sheets("Sheet1")
obj.visible="True"
search_item="HYDERABAD"
set found=objsheet.Cells.Find(search_item)
On Error resume next
flagrow = found.Row
flagcol = found.Column
msgbox "Location Is : ( Row : "&flagrow&",Col :"&flagcol&")"
objwb.Save
objwb.Close
Set objwb= Nothing
'-----------------------------------------------------------
2) Repeated Character
str="Koteswararao"
repcnt=Split(str,"a")
Msgbox "Count :"&ubound(repcnt)&""
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the properties you would use for identifying a browser and page when using descriptive programming?
How to test background color and dynamic images during run time can you put the check point for moving objects?
Define Environment Variable in UFT and its uses?
What is smart identification in QTP?
How can you give wait up to 10 seconds in qtp?
what are the challenges you have faced while testing web based application using the automation tools ?
Explain about datafile/verification of date file when file is not available in local system?
Is it possible to change the property value at runtime? How it is possible?
Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?
What is output value? How many types of output values are there in qtp?
Give the syntax to load function at run time.
after click on compose mail how can we attached a file in qtp with vbscript code
Hi, How Accessibility checkpoint in QTP can be implemented in the test script?
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
How can i click on any Excel sheet's "H" column with out writing coordinates Ex:Window("Book1").WinObject("Book1").Click 498,14 I dont want to give coordinates like 498,14 Can i open "H" column by writing like Ex:Window("Book1").WinObject("Book1").Click "H" or Ex:Window("Book1").WinObject("Book1").Click "H","1" or Ex:Window("Book1").WinObject("Book1").Click H,1 If i want to click on "Sheet3" of an excel sheet, Can i open like Ex:Window("Book1").WinObject("Book1").Click "Sheet3" Please help me any one