How to extract data from chart or graph in Excel?
Extract data from chart with VBA
Navigation--AutoText (add usually used charts to AutoText pane.then one click to insert it when you need.)
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
1. You need to create a new worksheet and rename it as ChartData. See screenshot:
|Kutools for Excel, with more than 120 handy Excel functions, enhance working efficiency and save working time.|
2. Then select the chart you want to extract data from and press Alt + F11 keys simultaneously, and a Microsoft Visual Basic for Applications window pops.
3. Click Insert > Module, then paste below VBA code to the popping Module window.
VBA: Extract data from chart.
Sub GetChartValues() 'Updateby20150203 Dim xNum As Integer Dim xSeries As Object xCount = 2 xNum = UBound(Application.ActiveChart.SeriesCollection(1).Values) Application.Worksheets("ChartData").Cells(1, 1) = "X Values" With Application.Worksheets("ChartData") .Range(.Cells(2, 1), _ .Cells(xNum + 1, 1)) = _ Application.Transpose(ActiveChart.SeriesCollection(1).XValues) End With For Each xSeries In Application.ActiveChart.SeriesCollection Application.Worksheets("ChartData").Cells(1, xCount) = xSeries.Name With Application.Worksheets("ChartData") .Range(.Cells(2, xCount), _ .Cells(xNum + 1, xCount)) = _ Application.WorksheetFunction.Transpose(xSeries.Values) End With xCount = xCount + 1 Next End Sub
4. Then click Run button to run the VBA. See screenshot:
Then you can see the data is extracted to ChartData sheet.
Export Range as Graphic
|Kutools' Export Range as Graphic is aim to save or export a selection cells as multiple graphic formats.|
1. You can format the cells as you need.
2. The data of the selected chart is extracted to the first cell of the ChartData sheet in default.
|If you are interested in this addi-in, download the 60-days free trial.|