Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default reading Data from Shapes?

I have a chart ("Len Jns") with what I think is a shape with some statistics
in a list(generated by an add in program).
Statistics
Cp=2.31
Cpk= 2.17
Cpu= 2.44 (0%)
Cpl= 2.17 (0%)
Est. Sigma= 0.2168557692295
Pp=1.28
Ppk= 1.2
Ppu= 1.35 (0%)
Ppl= 1.2 (0.02%)
Sigma= 0.391015203995593
Average=-0.088711611594405
Min=-1.18851392383101
Max=1.12866817155756
Count=69
No. Out of Spec=0 (0%)
Kurtosis=2.7
Skewness=0.69
I would like to be able to read this list an copy some of the data to
another worksheet.
Started with the following code which selects the correct object, which has
about 18 lines of statistical data. I need to read some of the data in the
middle of the list, such as the line with the Ppk data. I have tried Comments
etc with no luck. Any help would be greatly appreciated.

Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default reading Data from Shapes?

I don't have enough info to help. what i recommend is to Turn on Macro
Record and try to manually copy the data from the chart. Then post the code
so we can see what type of shape obeject you really have.

"Steve" wrote:

I have a chart ("Len Jns") with what I think is a shape with some statistics
in a list(generated by an add in program).
Statistics
Cp=2.31
Cpk= 2.17
Cpu= 2.44 (0%)
Cpl= 2.17 (0%)
Est. Sigma= 0.2168557692295
Pp=1.28
Ppk= 1.2
Ppu= 1.35 (0%)
Ppl= 1.2 (0.02%)
Sigma= 0.391015203995593
Average=-0.088711611594405
Min=-1.18851392383101
Max=1.12866817155756
Count=69
No. Out of Spec=0 (0%)
Kurtosis=2.7
Skewness=0.69
I would like to be able to read this list an copy some of the data to
another worksheet.
Started with the following code which selects the correct object, which has
about 18 lines of statistical data. I need to read some of the data in the
middle of the list, such as the line with the Ppk data. I have tried Comments
etc with no luck. Any help would be greatly appreciated.

Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default reading Data from Shapes?

I have tried that and get the following code
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select
Selection.Characters.Text = _
"Statistics" & Chr(10) & "Cp=2.31" & Chr(10) & "Cpk= 2.17" & Chr(10)
& "Cpu= 2.44 (0%)" & Chr(10) & "Cpl= 2.17 (0%)" & Chr(10) & "Est. Sigma=
0.2168557692295" & Chr(10) & "Pp=1.28" & Chr(10) & "Ppk= 1.2" & Chr(10) &
"Ppu= 1.35 (0%)" & Chr(10) & "Ppl= 1.2 (0.02%)" & Chr(10) & "Sigma=
0.391015203995593" & Chr(10) & "Average=-0.088711611594405" & Chr(10) &
"Min=-1.18851"
Selection.Characters(201).Insert String:= _
"392383101" & Chr(10) & "Max=1.12866817155756" & Chr(10) &
"Count=69" & Chr(10) & "No. Out of Spec=0 (0%)" & Chr(10) & "Kurtosis=2.7" &
Chr(10) & "Skewness=0.69" & Chr(10) & ""
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "Arial Narrow"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.AutoScaleFont = False
With Selection.Characters(Start:=11, Length:=280).Font
.Name = "Arial Narrow"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Sheets("Data JNS").Select
Range("K2").Select
ActiveSheet.Paste

The problem I have is the values in the selection will change as the chart
is updated and I want to be able to read the current values

"Joel" wrote:

I don't have enough info to help. what i recommend is to Turn on Macro
Record and try to manually copy the data from the chart. Then post the code
so we can see what type of shape obeject you really have.

"Steve" wrote:

I have a chart ("Len Jns") with what I think is a shape with some statistics
in a list(generated by an add in program).
Statistics
Cp=2.31
Cpk= 2.17
Cpu= 2.44 (0%)
Cpl= 2.17 (0%)
Est. Sigma= 0.2168557692295
Pp=1.28
Ppk= 1.2
Ppu= 1.35 (0%)
Ppl= 1.2 (0.02%)
Sigma= 0.391015203995593
Average=-0.088711611594405
Min=-1.18851392383101
Max=1.12866817155756
Count=69
No. Out of Spec=0 (0%)
Kurtosis=2.7
Skewness=0.69
I would like to be able to read this list an copy some of the data to
another worksheet.
Started with the following code which selects the correct object, which has
about 18 lines of statistical data. I need to read some of the data in the
middle of the list, such as the line with the Ppk data. I have tried Comments
etc with no luck. Any help would be greatly appreciated.

Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default reading Data from Shapes?

I think this will work

with Sheets("Len Jns")
ChartText = .ActiveChart.Shapes("ds").Characters.Text
end with



"Steve" wrote:

I have tried that and get the following code
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select
Selection.Characters.Text = _
"Statistics" & Chr(10) & "Cp=2.31" & Chr(10) & "Cpk= 2.17" & Chr(10)
& "Cpu= 2.44 (0%)" & Chr(10) & "Cpl= 2.17 (0%)" & Chr(10) & "Est. Sigma=
0.2168557692295" & Chr(10) & "Pp=1.28" & Chr(10) & "Ppk= 1.2" & Chr(10) &
"Ppu= 1.35 (0%)" & Chr(10) & "Ppl= 1.2 (0.02%)" & Chr(10) & "Sigma=
0.391015203995593" & Chr(10) & "Average=-0.088711611594405" & Chr(10) &
"Min=-1.18851"
Selection.Characters(201).Insert String:= _
"392383101" & Chr(10) & "Max=1.12866817155756" & Chr(10) &
"Count=69" & Chr(10) & "No. Out of Spec=0 (0%)" & Chr(10) & "Kurtosis=2.7" &
Chr(10) & "Skewness=0.69" & Chr(10) & ""
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "Arial Narrow"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.AutoScaleFont = False
With Selection.Characters(Start:=11, Length:=280).Font
.Name = "Arial Narrow"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Sheets("Data JNS").Select
Range("K2").Select
ActiveSheet.Paste

The problem I have is the values in the selection will change as the chart
is updated and I want to be able to read the current values

"Joel" wrote:

I don't have enough info to help. what i recommend is to Turn on Macro
Record and try to manually copy the data from the chart. Then post the code
so we can see what type of shape obeject you really have.

"Steve" wrote:

I have a chart ("Len Jns") with what I think is a shape with some statistics
in a list(generated by an add in program).
Statistics
Cp=2.31
Cpk= 2.17
Cpu= 2.44 (0%)
Cpl= 2.17 (0%)
Est. Sigma= 0.2168557692295
Pp=1.28
Ppk= 1.2
Ppu= 1.35 (0%)
Ppl= 1.2 (0.02%)
Sigma= 0.391015203995593
Average=-0.088711611594405
Min=-1.18851392383101
Max=1.12866817155756
Count=69
No. Out of Spec=0 (0%)
Kurtosis=2.7
Skewness=0.69
I would like to be able to read this list an copy some of the data to
another worksheet.
Started with the following code which selects the correct object, which has
about 18 lines of statistical data. I need to read some of the data in the
middle of the list, such as the line with the Ppk data. I have tried Comments
etc with no luck. Any help would be greatly appreciated.

Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default reading Data from Shapes?

Joel
I get an error "Object doesn't support this property or method".


"Joel" wrote:

I think this will work

with Sheets("Len Jns")
ChartText = .ActiveChart.Shapes("ds").Characters.Text
end with



"Steve" wrote:

I have tried that and get the following code
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select
Selection.Characters.Text = _
"Statistics" & Chr(10) & "Cp=2.31" & Chr(10) & "Cpk= 2.17" & Chr(10)
& "Cpu= 2.44 (0%)" & Chr(10) & "Cpl= 2.17 (0%)" & Chr(10) & "Est. Sigma=
0.2168557692295" & Chr(10) & "Pp=1.28" & Chr(10) & "Ppk= 1.2" & Chr(10) &
"Ppu= 1.35 (0%)" & Chr(10) & "Ppl= 1.2 (0.02%)" & Chr(10) & "Sigma=
0.391015203995593" & Chr(10) & "Average=-0.088711611594405" & Chr(10) &
"Min=-1.18851"
Selection.Characters(201).Insert String:= _
"392383101" & Chr(10) & "Max=1.12866817155756" & Chr(10) &
"Count=69" & Chr(10) & "No. Out of Spec=0 (0%)" & Chr(10) & "Kurtosis=2.7" &
Chr(10) & "Skewness=0.69" & Chr(10) & ""
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "Arial Narrow"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.AutoScaleFont = False
With Selection.Characters(Start:=11, Length:=280).Font
.Name = "Arial Narrow"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Sheets("Data JNS").Select
Range("K2").Select
ActiveSheet.Paste

The problem I have is the values in the selection will change as the chart
is updated and I want to be able to read the current values

"Joel" wrote:

I don't have enough info to help. what i recommend is to Turn on Macro
Record and try to manually copy the data from the chart. Then post the code
so we can see what type of shape obeject you really have.

"Steve" wrote:

I have a chart ("Len Jns") with what I think is a shape with some statistics
in a list(generated by an add in program).
Statistics
Cp=2.31
Cpk= 2.17
Cpu= 2.44 (0%)
Cpl= 2.17 (0%)
Est. Sigma= 0.2168557692295
Pp=1.28
Ppk= 1.2
Ppu= 1.35 (0%)
Ppl= 1.2 (0.02%)
Sigma= 0.391015203995593
Average=-0.088711611594405
Min=-1.18851392383101
Max=1.12866817155756
Count=69
No. Out of Spec=0 (0%)
Kurtosis=2.7
Skewness=0.69
I would like to be able to read this list an copy some of the data to
another worksheet.
Started with the following code which selects the correct object, which has
about 18 lines of statistical data. I need to read some of the data in the
middle of the list, such as the line with the Ppk data. I have tried Comments
etc with no luck. Any help would be greatly appreciated.

Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default reading Data from Shapes?

It looks like the chart was already acivated won the worksheet in your
original code. I added code to get the chart activated. Once you find the
real chanrt name from the code before modify as necessary.

Sub test()
For Each chrt In ActiveSheet.ChartObjects
MsgBox ("Chart Name : " & chrt.Name)
chrtname = chrt.Name
Next chrt
With Sheets("Len Jns")
Set a = Sheets("Len Jns")
.ChartObjects(chrtname).Activate
ChartText = .ActiveChart.Shapes("ds").Characters.Text
End With

End Sub

"Steve" wrote:

Joel
I get an error "Object doesn't support this property or method".


"Joel" wrote:

I think this will work

with Sheets("Len Jns")
ChartText = .ActiveChart.Shapes("ds").Characters.Text
end with



"Steve" wrote:

I have tried that and get the following code
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select
Selection.Characters.Text = _
"Statistics" & Chr(10) & "Cp=2.31" & Chr(10) & "Cpk= 2.17" & Chr(10)
& "Cpu= 2.44 (0%)" & Chr(10) & "Cpl= 2.17 (0%)" & Chr(10) & "Est. Sigma=
0.2168557692295" & Chr(10) & "Pp=1.28" & Chr(10) & "Ppk= 1.2" & Chr(10) &
"Ppu= 1.35 (0%)" & Chr(10) & "Ppl= 1.2 (0.02%)" & Chr(10) & "Sigma=
0.391015203995593" & Chr(10) & "Average=-0.088711611594405" & Chr(10) &
"Min=-1.18851"
Selection.Characters(201).Insert String:= _
"392383101" & Chr(10) & "Max=1.12866817155756" & Chr(10) &
"Count=69" & Chr(10) & "No. Out of Spec=0 (0%)" & Chr(10) & "Kurtosis=2.7" &
Chr(10) & "Skewness=0.69" & Chr(10) & ""
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "Arial Narrow"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.AutoScaleFont = False
With Selection.Characters(Start:=11, Length:=280).Font
.Name = "Arial Narrow"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Sheets("Data JNS").Select
Range("K2").Select
ActiveSheet.Paste

The problem I have is the values in the selection will change as the chart
is updated and I want to be able to read the current values

"Joel" wrote:

I don't have enough info to help. what i recommend is to Turn on Macro
Record and try to manually copy the data from the chart. Then post the code
so we can see what type of shape obeject you really have.

"Steve" wrote:

I have a chart ("Len Jns") with what I think is a shape with some statistics
in a list(generated by an add in program).
Statistics
Cp=2.31
Cpk= 2.17
Cpu= 2.44 (0%)
Cpl= 2.17 (0%)
Est. Sigma= 0.2168557692295
Pp=1.28
Ppk= 1.2
Ppu= 1.35 (0%)
Ppl= 1.2 (0.02%)
Sigma= 0.391015203995593
Average=-0.088711611594405
Min=-1.18851392383101
Max=1.12866817155756
Count=69
No. Out of Spec=0 (0%)
Kurtosis=2.7
Skewness=0.69
I would like to be able to read this list an copy some of the data to
another worksheet.
Started with the following code which selects the correct object, which has
about 18 lines of statistical data. I need to read some of the data in the
middle of the list, such as the line with the Ppk data. I have tried Comments
etc with no luck. Any help would be greatly appreciated.

Sheets("Len Jns").Select
ActiveChart.Shapes("ds").Select

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
Reading data arrays from multiple data files in excel Hankjam[_2_] Excel Discussion (Misc queries) 0 February 7th 08 08:29 PM
Naming Auto Shapes and Creating new Shapes AL2000 Excel Discussion (Misc queries) 3 September 10th 07 04:12 AM
When drawing shapes in excel the shapes keep disappearing Tape Excel Discussion (Misc queries) 1 October 6th 06 04:23 PM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM


All times are GMT +1. The time now is 03:48 AM.

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

About Us

"It's about Microsoft Excel"