+ Reply to Thread
Results 1 to 3 of 3

Excel 2008 : Excel 2010 Export or copy values from chart

Hybrid View

  1. #1
    Registered User
    Join Date
    03-31-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2010
    Posts
    2

    Excel 2010 Export or copy values from chart

    I have downloaded a file containing a chart made from values from another excel file (which I don't have access to). Is there a way for me to export or copy these values into a table in excel?

    I'm attaching the file with the chart, in case someone needs to see it to understand what I'm talking about.

    chart.xls

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

    Re: Excel 2010 Export or copy values from chart

    You can with vba

    Sub ExtractValues()
    
        Dim objSeries As Series
        Dim lngRow As Long
        Dim lngCol As Long
        Dim chtTemp As Chart
        Dim vntItem As Variant
        
        Set chtTemp = ActiveSheet.ChartObjects(1).Chart
        lngCol = 1
        For Each objSeries In chtTemp.SeriesCollection
            lngRow = 24
            If lngCol = 1 Then
                lngRow = lngRow + 1
                For Each vntItem In objSeries.XValues
                    Cells(lngRow, lngCol) = vntItem
                    lngRow = lngRow + 1
                Next
            Else
                Cells(lngRow, lngCol) = objSeries.Name
                lngRow = lngRow + 1
                For Each vntItem In objSeries.Values
                    Cells(lngRow, lngCol) = vntItem
                    lngRow = lngRow + 1
                Next
            End If
            lngCol = lngCol + 1
        Next
        
    End Sub
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-31-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2010
    Posts
    2

    Talking Re: Excel 2010 Export or copy values from chart

    Yey, it worked! No way Google could have helped me with that one. Thanks a lot for your help, you are a lifesaver!

+ 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