Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear friends,
I need help in a macro In an excel file, I have a webquery. I wrote a macro to get certain details from the webpage. url is http://www.buzzingstocks.com/in/btest.pl?t=SUZLON&f=2 (I want to get "Date" "Last Recommendation" "Return on Investment" & "Annualized returns" for each company Sheet1 has the web query. name of the query is "btest" Sheet2 has folowing data SYMBOL , NAME OF COMPANY , Date , Type , ROI , AR 20MICRONS , 20 Microns Limited , , , , 3IINFOTECH , 3i Infotech Limited , , , , 3MINDIA , 3M India Limited , , , , AARTIDRUGS , Aarti Drugs Ltd. , , , , AARTIIND , Aarti Industries Ltd. , , , , AARVEEDEN , Aarvee Denims & Exports Limited , , , , ABAN , Aban Offshore Ltd. , , , , Above is a sample data, In all I have 1500 rows of data I want the macro to fill up the columns C D E F Here is the macro Sub Macro1() Dim ctr As Long For ctr = 2 To 8 'Cells(Rows.Count, "a").End(xlUp).Row On Error Resume Next With Sheet1 With .QueryTables("btest") .Connection = _ "URL;http://www.buzzingstocks.com/in/btest.pl?" _ & "t=" & Cells(ctr, "a") & "&f=2" End With Cells(ctr, "c").Value = .Cells(26, "a").Value Cells(ctr, "d").Value = .Cells(26, "i").Value Cells(ctr, "e").Value = .Cells(28, "d").Value Cells(ctr, "f").Value = .Cells(28, "g").Value End With Next ctr ThisWorkbook.Save End Sub Somehow it does not fetches entries for few companies. Please help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AutoRun Macro with a delay to give user the choice to cancel the macro | Excel Programming | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |