Copy worksheet (values only) to new workbook

Jing

Active Member
Joined
Feb 11, 2011
Messages
289
I have created the following macro to copy a worksheet called Parsed to a new workbook...
the problem that i am running into is that it is coping the actual formula's to the new workbook.
All i need it to do is copy the values in the worksheet so that the data will show in a new workbook.

Code:
Sub PARSE()
    Sheets("Parsed").Select
    Cells.Select
    Selection.Copy
    Sheets("Parsed").Select
    Range("A1").Select
    Columns("A:Q").Select
    Workbooks.Add
    ActiveSheet.Paste
End Sub

Thank you
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try this:

Code:
Sub PARSE()
    Workbooks.Add
    Workbooks([COLOR="#FF0000"]"Book2.xls"[/COLOR]).Sheets("Parsed").UsedRange.Copy Destination:=ActiveSheet.Range("A1")
End Sub

Change "Book2.xls" to workbook name in which "Parsed" sheet resides.
 
Upvote 0
this still copies the formula's to the new work book and not just the values in the cells.
so of course all of the data on the new workbook is errors or #name?, as it has no reference to the other sheets.

Any other Idea's?

thanks in advance.
 
Upvote 0
this still copies the formula's to the new work book and not just the values in the cells.
so of course all of the data on the new workbook is errors or #name?, as it has no reference to the other sheets.

Any other Idea's?

thanks in advance.

My mistake.

Try this instead:
Code:
Sub PARSE()
    Workbooks.Add
    Workbooks("Book2.xls").Sheets("Parsed").UsedRange.Copy
    ActiveSheet.Range("A1").PasteSpecial xlPasteValuesAndNumberFormats
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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