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


Please Help Members By Posting Answers For Below Questions

What are the key points to create a framework in QTP for oracle forms?

1800


How can get count of list box?

631


before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...

7210


How will you report the bug and explain the defect tracking sheet you handled?

2541


Diff b/w test scenario's and test Procedures?

1624






How to give a call to another action from one action?

619


How did you use regular expressions in QTP and also in WR?

2156


I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance

1706


What are main panes available in qtp test browser?

528


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

2520


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1412


How many ways we can parameterize data in quicktest professional (qtp)?

579


what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”

1484


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

1423


what frame work you are following?

1518