Copy worksheet (values only) to new workbook
Results 1 to 4 of 4

Thread: Copy worksheet (values only) to new workbook
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Feb 2011
    Posts
    288
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Copy worksheet (values only) to new workbook

    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 by Jing; Jul 31st, 2012 at 09:49 PM.

  2. #2
    Board Regular drsarao's Avatar
    Join Date
    Sep 2009
    Location
    Delhi, India
    Posts
    1,112
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Copy worksheet (values only) to new workbook

    Try this:

    Code:
    Sub PARSE()
        Workbooks.Add
        Workbooks("Book2.xls").Sheets("Parsed").UsedRange.Copy Destination:=ActiveSheet.Range("A1")
    End Sub
    Change "Book2.xls" to workbook name in which "Parsed" sheet resides.
    Excel 2007 Windows 7

  3. #3
    Board Regular
    Join Date
    Feb 2011
    Posts
    288
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Copy worksheet (values only) to new workbook

    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.

  4. #4
    Board Regular drsarao's Avatar
    Join Date
    Sep 2009
    Location
    Delhi, India
    Posts
    1,112
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Copy worksheet (values only) to new workbook

    Quote Originally Posted by Jing View Post
    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
    Excel 2007 Windows 7

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •