+ Reply to Thread
Results 1 to 5 of 5

Copying chart from one sheet to another and remove links

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Copying chart from one sheet to another and remove links

    Hi all,

    Currently have the below code which selects one of three charts based on a value in a validation cell on a separate sheet and pastes the selected chart in cell m14 on the same sheet as the validation cell.

    Please Login or Register  to view this content.
    What I'd like to do is paste the chart but without the links to the original data. I presume pastespecial is the best approach? But I'm struggling to get anything to work.

    I need the copied chart to remain as a chart; i.e. It can't be copied and pasted as a picture otherwise the ChartObjects(1).Delete won't work .

    Thanks in advance.

    DrG
    Last edited by drgwhizz; 01-27-2012 at 10:42 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Copying chart from one sheet to another and remove links

    It depends on how complex your chart and it's data is.
    See here for information.
    http://peltiertech.com/Excel/ChartsH...ChartData.html
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-17-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Copying chart from one sheet to another and remove links

    Quote Originally Posted by Andy Pope View Post
    It depends on how complex your chart and it's data is.
    See here for information.
    http://peltiertech.com/Excel/ChartsH...ChartData.html
    Thanks for the link. From the information contained I've managed to remove the links from the selected chart using the code below.

    Please Login or Register  to view this content.
    Is there a way to select all charts in the active worksheet prior to this process, so that all the charts have links removed?

    And is there also a way to combine the above with a process which formats the data labels into currency format with 2 decimal places?

    EDIT: Solved the data label formatting issue with the code below:

    Please Login or Register  to view this content.
    So now just stuck trying to automate the process for all charts on the worksheet rather than just the active ones. I'm not sure what code is needed at the start of the process.

    Thanks.
    Last edited by drgwhizz; 01-27-2012 at 08:14 AM.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Copying chart from one sheet to another and remove links

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-17-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Copying chart from one sheet to another and remove links

    Thanks for all your help Andy,

    I'd just managed to get some code working for me and was about to post. Although possibly not the most efficient code it appears to be working for me at the moment:

    Please Login or Register  to view this content.

    Managed to pull bits together from the link you provided earlier. +rep.

    Problem SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1