+ Reply to Thread
Results 1 to 2 of 2

Excel chart source data

  1. #1
    John
    Guest

    Excel chart source data

    Is there a way with code to clear the source data from an chart in Excel? I
    don't want to delete the chart just clear the source data when the workbook
    is closed.
    Thanks



  2. #2
    Andy Pope
    Guest

    Re: Excel chart source data

    Hi John,

    The following will remove each data series from the active chart.
    Sub x()
    ' remove data from chart
    With ActiveChart
    Do While .SeriesCollection.Count > 0
    .SeriesCollection(1).Delete
    Loop
    End With
    End Sub

    Cheers
    Andy


    John wrote:
    > Is there a way with code to clear the source data from an chart in Excel? I
    > don't want to delete the chart just clear the source data when the workbook
    > is closed.
    > Thanks
    >
    >


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info

+ 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