Formula or VBA for copy and paste special

Ingolf

Banned
Joined
Mar 20, 2011
Messages
809
Hello!

I need a formula or VBA to copy date from a table from internet (DATA-from Web). This table is updated every day, except weekend, and contain data for 45 days. So every day apear data for today and is delete the oldest day. I take with vlookup date from first table but I need to be carefool to copy from time to time and paste special as value that date.

Town1 20.04.2011 0.1142547
Town2 21.04.2011 0.1095245
...
Town2 26.04.2011 0.1112547

from this table I take with vlookup data from column B an C in an other table and I need a formula to do somethin like "copy-paste special-as value" in the third table. Hope you excuse my bad english and understend what I want.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
This should work for the code in the last paragraph. Be sure to change the range reference to any cell in your third table.

Code:
Option Explicit
 
Sub CurrentRegionPasteSpecial()
    With Range("A1").CurrentRegion 'Change range to be any cell in the 3rd table
        .Copy
        .PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
        .Cells(1.1).Select
    End With
    Application.CutCopyMode = False
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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
Back
Top