Web Query

Joneye

Well-known Member
Joined
May 28, 2010
Messages
745
I have a excel sheet that draws in google shares information, this is pulled in every 6 minutes.

The cell changes as per the price of the share, is there any possible way to have the previous cells data extracted to another cell before the new data arrives?

Is this a VBA function or is their a formula?
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,266
Office Version
  1. 2013
Platform
  1. Windows
Hi Jon
I believe this is a VBA solution.
IS it your macro that pulls data from the Web ??
If so, before it does the pull place the lines ( change to suit), in the macro
Code:
Range("A1").Copy Destination:=Range("A2")
 

Joneye

Well-known Member
Joined
May 28, 2010
Messages
745
I use the Web Query Feature under the data tab to draw in the information.

It comes into a tab and in a master sheet I draw in the cell im interested in.

Does this help?
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,266
Office Version
  1. 2013
Platform
  1. Windows

ADVERTISEMENT

Are you using code...if so, maybe you should post it.
Did you look at Andrews link
 

Joneye

Well-known Member
Joined
May 28, 2010
Messages
745
No code, its a feature in excel 2003, click on the data tab, scrol down to import external data then select New Web Query

No code unless its hidden from me.
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,266
Office Version
  1. 2013
Platform
  1. Windows
Jon
Yeah, I know how Web query works. I thought you may have created a macro to run it and then we could simply add the copy / paste

I use this snippet to run my Web quesry and it would be simple to add the line to copy and paste at the beginning.
Code:
Sub NRL()
Range("D2:M19").Clear 'you could add your copy and paste here
Range("D2").Select
Application.DisplayAlerts = False
    With Selection.QueryTable
        .Connection = "URL;http://www.thescore.com.au/nrl/ladder.html"
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingAll
        .WebTables = "1"
        .WebDisableRedirections = True
        .Refresh BackgroundQuery:=False
    End With
    Columns("E:L").ColumnWidth = 4.71
Range("I2:M2").ClearContents
ActiveWorkbook.Save
End Sub
hope this gives you some ideas.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,127
Messages
5,526,993
Members
409,733
Latest member
revender17

This Week's Hot Topics

Top