LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Need help with macro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"