Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to search a value in excel sheet using vb script
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Basanth,
Thanks for giving the logic and i implemeted and its working fine but which is taking more time to execute, can u please try to reduce the execution time

Code:
set a=Createobject("Excel.Application")
set b=a.Workbooks.open("D:\av.xls")
set c=a.worksheets("sheet1")
m=2
For i=1 to 40 step 1 'For number of rows i.e it will be searching among the first 40 rows
For j=1 to 3 step 1 ' for number of columns i.e it wil be searchinf among the first 3 columns
d=c.cells(i,j).value
If d="Tokyo" then
datatable.Value(1,1)=i
datatable.Value(2,1)=j
datatable.SetCurrentRow(m)
m=m+1
end if
Next
Next
b.close
datatable.Export("d:/av1.xls")


Please help me in this reagard,

Thanks in advance,
Venkat.
Reply


Messages In This Thread
RE: How to search a value in excel sheet using vb script - by venkatbatchu - 10-07-2009, 05:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to select value from google search box dropdown +QTP prajyot 0 2,925 06-28-2017, 06:30 PM
Last Post: prajyot
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,738 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  Search and import data from excel under some rules. nwpulele 2 2,978 02-19-2015, 04:10 AM
Last Post: supputuri
  Excel and Driver Script shipu 1 3,866 02-27-2014, 09:09 AM
Last Post: supputuri
  Custom sort -Excel Sheet kiran 1 3,901 01-28-2014, 09:23 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 2 Guest(s)