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
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

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

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Code:
Rng.Areas(1).Copy
Sh2.Range("A1").PasteSpecial xlPasteValues
 

Watch MrExcel Video

Forum statistics

Threads
1,122,207
Messages
5,594,841
Members
413,944
Latest member
3xc3ln00b

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