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

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,134
Office Version
2013
Platform
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,134
Office Version
2013
Platform
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,134
Office Version
2013
Platform
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.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,654
Messages
5,512,639
Members
408,908
Latest member
ShaneMorr

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top