Copy/Paste "values" using Range??

kwagner1

Active Member
Joined
Jun 10, 2003
Messages
445
greetings,

I'm using the following code to insert a second worksheet and then copy/paste the data on the first worksheet to the second worksheet (i.e., FINAL-DATA). I want to copy/paste "values" so the formatting is not brought forward - how would i tweek my code?? (i'm stuck!) thanks!

Sub CopyMSQueryresultsToSheet2()
' copy/paste the msquery results data to a second worksheet and then start formatting
' Add a new sheet
Sheets.Add(After:=Sheets(Sheets.Count)).Name = "FINAL-DATA" ' add new sheet
Worksheets(1).Activate

Set Sh1 = Worksheets(1)
Set Rng = Sh1.Range("A1").CurrentRegion
Set Sh2 = Worksheets("FINAL-DATA")

Rng.Areas(1).Copy Sh2.Range("A1") <--- copy/paste Values here????

End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try

Code:
Rng.Areas(1).Copy
Sh2.Range("A1").PasteSpecial Paste:=xlPasteValues
 
Upvote 0
Code:
Rng.Areas(1).Copy
Sh2.Range("A1").PasteSpecial xlPasteValues
 
Upvote 0

Forum statistics

Threads
1,214,800
Messages
6,121,641
Members
449,044
Latest member
hherna01

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