Results 1 to 6 of 6

Obtain selected fields from web, copy to sheet

Threaded View

  1. #1
    Registered User
    Join Date
    07-05-2010
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    16

    Obtain selected fields from web, copy to sheet

    Hi Forum contributors
    Is it possible to automate the copying of selected fields from a web page to my Excel sheet?
    The fields that need copying are the Earning Announcement date (in Company events) and Analyst Opinion Recommondation Trends (in Analyst Opinion).
    Currently I use this macro:
    Sub Earnings()
        Dim x As Integer, y As Integer
        '--------------------------------------------------------------------------
        Range("A1").Activate
        Cells.Find(What:="Row Number", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
            False, SearchFormat:=False).Activate
        x = ActiveCell.Offset(0, 1)     'Total Rows
        y = ActiveCell.Offset(0, 2)     'Highlighted Rows
        '--------------------------------------------------------------------------
        
        Range("A2").Select              'Link to yahoo financial page for this stock
        
        For I = 1 To y
            
            Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
            
            Stop                                'Manually copy Company Events Earnings Announcement Date
            ActiveCell.Offset(0, 2).Select
            ActiveSheet.Paste
            '-------------------------------
            ActiveCell.Offset(0, 1).Select
            Stop                                'Manually copy Analyst Opinion Recommendation Trends
            ActiveSheet.Paste
            ActiveCell.Offset(1, -3).Select
        Next I
       
    End Sub
    Attached Files Attached Files
    Last edited by ez2rmbr; 02-04-2011 at 02:43 AM. Reason: Greater precision

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1