Web Query

Joneye

Well-known Member
Joined
May 28, 2010
Messages
760
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
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?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,276
Office Version
  1. 365
  2. 2007
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
760
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
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
21,276
Office Version
  1. 365
  2. 2007
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
760
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
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
21,276
Office Version
  1. 365
  2. 2007
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,713
Messages
5,833,269
Members
430,200
Latest member
ADLHMA2022

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top