Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default Creating data from a chart

If someone emails me a chart, but does not include the source data, is there
anyway to generate that data from the chart?
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Creating data from a chart

Hi,

Assuming you have a chart and not an image of a chart you could either
Select a series and go to the formula bar and press F9.

In a very simple test example the following formula converted to,

=SERIES(,[Book3]Sheet1!$A$2:$A$5,[Book3]Sheet1!$B$2:$B$5,1)

=SERIES(,{"a","b","c","d"},{1,2,3,4},1)

or you could try using code.

Sub GetChartData()
' output labels and values to sheet
Dim vntData As Variant
Dim vntLabels As Variant
Dim lngIndex As Long

With ActiveChart
With .SeriesCollection(1)
vntData = .Values
vntLabels = .XValues
For lngIndex = LBound(vntData) To UBound(vntData)
ActiveSheet.Cells(lngIndex, 1) = vntLabels(lngIndex)
ActiveSheet.Cells(lngIndex, 2) = vntData(lngIndex)
Next
End With
End With

End Sub

Cheers
Andy


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Sarah0824" wrote in message
...
If someone emails me a chart, but does not include the source data, is
there
anyway to generate that data from the chart?


  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 57
Default Creating data from a chart

In the event someone is trying to extract data from a chart "picture" where
there are no linked data, there is a neat little Excel-based utility where
one inputs known x and y axes limits and a few other inputs, then it
approximates the values found in the graph.

Andy and others, no doubt, could program such things. This one is someone's
commercial effort...

Google for... Grab It! Graph Digitizer.

Cheers! Brad


"Andy Pope" wrote in message
...
Hi,

Assuming you have a chart and not an image of a chart you could either
Select a series and go to the formula bar and press F9.

In a very simple test example the following formula converted to,

=SERIES(,[Book3]Sheet1!$A$2:$A$5,[Book3]Sheet1!$B$2:$B$5,1)

=SERIES(,{"a","b","c","d"},{1,2,3,4},1)

or you could try using code.

Sub GetChartData()
' output labels and values to sheet
Dim vntData As Variant
Dim vntLabels As Variant
Dim lngIndex As Long

With ActiveChart
With .SeriesCollection(1)
vntData = .Values
vntLabels = .XValues
For lngIndex = LBound(vntData) To UBound(vntData)
ActiveSheet.Cells(lngIndex, 1) = vntLabels(lngIndex)
ActiveSheet.Cells(lngIndex, 2) = vntData(lngIndex)
Next
End With
End With

End Sub

Cheers
Andy


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Sarah0824" wrote in message
...
If someone emails me a chart, but does not include the source data, is
there
anyway to generate that data from the chart?




  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default Creating data from a chart

Great. thank you!

"Andy Pope" wrote:

Hi,

Assuming you have a chart and not an image of a chart you could either
Select a series and go to the formula bar and press F9.

In a very simple test example the following formula converted to,

=SERIES(,[Book3]Sheet1!$A$2:$A$5,[Book3]Sheet1!$B$2:$B$5,1)

=SERIES(,{"a","b","c","d"},{1,2,3,4},1)

or you could try using code.

Sub GetChartData()
' output labels and values to sheet
Dim vntData As Variant
Dim vntLabels As Variant
Dim lngIndex As Long

With ActiveChart
With .SeriesCollection(1)
vntData = .Values
vntLabels = .XValues
For lngIndex = LBound(vntData) To UBound(vntData)
ActiveSheet.Cells(lngIndex, 1) = vntLabels(lngIndex)
ActiveSheet.Cells(lngIndex, 2) = vntData(lngIndex)
Next
End With
End With

End Sub

Cheers
Andy


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Sarah0824" wrote in message
...
If someone emails me a chart, but does not include the source data, is
there
anyway to generate that data from the chart?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when creating a stock chart from data in .CSV file Curious[_2_] Excel Discussion (Misc queries) 9 April 16th 08 02:20 AM
Creating a chart using data from multiple worksheets Rose Charts and Charting in Excel 2 October 5th 07 08:17 PM
Creating a chart of text data Shellteach Excel Discussion (Misc queries) 2 August 6th 07 04:30 PM
Creating data for a chart DavidS Charts and Charting in Excel 4 December 2nd 06 06:31 PM
Creating Chart from Two Rows of Data [email protected] Excel Discussion (Misc queries) 3 September 8th 06 08:09 AM


All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"