ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦p¦ó°Ê¿ë§O¦³¦h¤Ösheetµe´X¦¸¹Ï

¦p¦ó°Ê¿ë§O¦³¦h¤Ösheetµe´X¦¸¹Ï

¦U¦ì¤j¤j¦n

¦]¤u§@»Ý¨D»Ý­n«Ø¥ß¤@­Ó¦Û°Êø¹ÏªºVBAµ{¦¡
¤w¦b¦¹¯¸¤W´MÀò¥i¦Û°Ê¿é¤J¸ê®Æªº¤è¦¡(·PÁ¤j¤j)
¦ý°ÝÃD¬O¨C¦¸¿é¤éªº¸ê®Æ¦h¤Ö¤£¤@©w(ps:¤@µ§¸ê®Æ,¤@­Ósheet;¦³®É3­Ósheets ¦³®É5­Ósheet,³Ì¦h¤£¶W¹L10²Õ)
¨C­Ósheet­nµe10±i¹Ï
§Ú¤w¿ý»sø¹Ïªº¥¨¶°,¦ý­n¥u·|­«½Æ©T©wªºsheet(ex: sheet1......plot;  sheet2......plot, sheet3...plot''''''°±¤î)
¦ý·|¦]¬°¨C¦¸¸ê®Æsheet¦h¤Ö¤£¤@©w;¦ÓµLªk¼g¦ºplot¦b¤@©wªºsheets¼Æ¶q(¦³®É3sheets, ¦³®É4sheets, ¦³®É6sheets,  ³Ì¦h10sheets)
½Ð°Ý¸Ó¦p¦ó¸Ñªü
¥H¤Uªþ¤Wµ{¦¡
§Æ±æ®æ¦ì¤j¤jÀ°¦£

                                    5.µe¹Ï.....................................................¥D­n¬O³o¤@¶ô(³£¹º¦b¤@±isheet¤W),·Q¦Û°Ê¿ì§O¦³¦h¤Ösheet¦Óµe´X¦¸
     Sub Plot()
'''''''''''''''''''''''''''''''''''''''''Chart(1) Ave. G.R. / HSP ADD'''''''''''''''''''''''''
    Sheets("¤u§@ªí1 (2)").Activate
    Range("AA20").Select
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
   
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(1).Name = "=""GSP"""
    ActiveChart.SeriesCollection(1).XValues = "='¤u§@ªí1 (2)'!$AA$3:$AA$17"
    ActiveChart.SeriesCollection(1).Values = "='¤u§@ªí1 (2)'!$AB$3:$AB$17"
      
    ActiveChart.SeriesCollection(1).Select
    With Selection.Format.Line
    .Visible = msoTrue
    .ForeColor.ObjectThemeColor = msoThemeColorText1
    End With
   
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(2).Name = "=""HGSP"""
    ActiveChart.SeriesCollection(2).XValues = "='¤u§@ªí1 (2)'!$AA$3:$AA$17"
    ActiveChart.SeriesCollection(2).Values = "='¤u§@ªí1 (2)'!$AC$3:$AC$17"
    ActiveChart.SeriesCollection(2).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(255, 0, 0)
    End With
   
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(3).Name = "=""LGSP"""
    ActiveChart.SeriesCollection(3).XValues = "='¤u§@ªí1 (2)'!$AA$3:$AA$17"
    ActiveChart.SeriesCollection(3).Values = "='¤u§@ªí1 (2)'!$AD$3:$AD$17"
    ActiveChart.SeriesCollection(3).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(255, 0, 0)
    End With
   
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(4).Name = "=""Ave.G.R."""
    ActiveChart.SeriesCollection(4).XValues = "='¤u§@ªí1 (2)'!$A$2:$A$20000"
    ActiveChart.SeriesCollection(4).Values = "='¤u§@ªí1 (2)'!$D$2:$D$20000"
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(5).Name = "=""HSP"""
    ActiveChart.SeriesCollection(5).XValues = "='¤u§@ªí1 (2)'!$A$2:$A$20000"
    ActiveChart.SeriesCollection(5).Values = "='¤u§@ªí1 (2)'!$O$2:$O$20000"
    ActiveChart.SeriesCollection(5).AxisGroup = 2
  ActiveChart.ApplyLayout (4)
   Dim xRg As Range
     Dim xChart As ChartObject
    Set xRg = Range("AA20:AG40")
  Set xChart = ActiveSheet.ChartObjects(1)
   With xChart
  .Top = xRg(1).Top
.Left = xRg(1).Left
.Width = xRg.Width
.Height = xRg.Height
   End With


ActiveChart.SetElement (msoElementChartTitleAboveChart)
    Selection.Caption = "Ave.G.R. vs HSP"

        
    ActiveChart.SetElement (msoElementPrimaryValueAxisTitleRotated)
    Selection.Caption = "G.R.(mm/hr)"
    ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
    Selection.Caption = "Length(mm)"
        
   
    ActiveSheet.ChartObjects(1).Activate
    ActiveChart.Axes(xlCategory).Select
    ActiveChart.Axes(xlCategory).MinimumScale = 0
    ActiveChart.Axes(xlCategory).MaximumScale = 1100
    ActiveChart.Axes(xlCategory).MajorUnit = 100
    ActiveChart.Axes(xlCategory).MinorUnit = 50
    ActiveChart.Axes(xlCategory).CrossesAt = 0

    ActiveChart.SetElement (msoElementPrimaryValueGridLinesMajor)
    ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)

Sheets("¤u§@ªí1").Activate


'''''''''''''''''''''''''''''''''''''''''Chart(2) HSP'''''''''''''''''''''''''

   Sheets("¤u§@ªí1 (2)").Activate
   Range("AI20").Select
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.ChartType = xlXYScatterSmoothNoMarkers

    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(1).Name = "=""Delta_HSP"""
    ActiveChart.SeriesCollection(1).XValues = "='¤u§@ªí1 (2)'!$AK$3:$AK$17"
    ActiveChart.SeriesCollection(1).Values = "='¤u§@ªí1 (2)'!$AM$3:$AM$17"
    ActiveChart.SeriesCollection.NewSeries

    ActiveChart.SeriesCollection(2).Name = "=""Delta_HSP(SOP)"""
     ActiveChart.SeriesCollection(2).XValues = "='¤u§@ªí1 (2)'!$AK$3:$AK$17"
    ActiveChart.SeriesCollection(2).Values = "='¤u§@ªí1 (2)'!$AN$3:$AN$17"

    ActiveChart.ApplyLayout (4)
   Dim yRg As Range
     Dim yChart As ChartObject
    Set yRg = Range("AI20:AN40")
  Set yChart = ActiveSheet.ChartObjects(2)
   With yChart
  .Top = yRg(1).Top
.Left = yRg(1).Left
.Width = yRg.Width
.Height = yRg.Height
   End With
   
    ActiveChart.SetElement (msoElementChartTitleAboveChart)
    Selection.Caption = "Delat_HSP"
   
    ActiveChart.SetElement (msoElementPrimaryValueAxisTitleRotated)
    Selection.Caption = "Delta_HSP(sp)"
   
    ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
    Selection.Caption = "Length(mm)"
   
   
    ActiveSheet.ChartObjects(2).Activate
    ActiveChart.Axes(xlCategory).Select
    ActiveChart.Axes(xlCategory).MinimumScale = 0
    ActiveChart.Axes(xlCategory).MaximumScale = 1100
    ActiveChart.Axes(xlCategory).MajorUnit = 100
    ActiveChart.Axes(xlCategory).MinorUnit = 50

   
    ActiveChart.SetElement (msoElementPrimaryValueGridLinesMajor)
    ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)
   

'''''''''''''''''''''''''''''''''''''''''''''''''''Chart(3)Pressure torr ADD'''''''''''''''''''''''''

Sheets("¤u§@ªí1 (2)").Activate

   Range("AP20").Select
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(1).Name = "=""F/T Press."""
    ActiveChart.SeriesCollection(1).XValues = "='¤u§@ªí1 (2)'!$A$2:$A$20000"
    ActiveChart.SeriesCollection(1).Values = "='¤u§@ªí1 (2)'!$I$2:$I$20000"

    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(2).Name = "=""Press. SP"""
    ActiveChart.SeriesCollection(2).XValues = "='¤u§@ªí1 (2)'!$A$2:$A$20000"
    ActiveChart.SeriesCollection(2).Values = "='¤u§@ªí1 (2)'!$P$2:$P$20000"
   
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(3).Name = "=""Press._SOP"""
    ActiveChart.SeriesCollection(3).XValues = "='¤u§@ªí1 (2)'!$AP$3:$AP$17"
    ActiveChart.SeriesCollection(3).Values = "='¤u§@ªí1 (2)'!$AT$3:$AT$17"

    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(4).Name = "=""Throttle Pos.(%)"""
    ActiveChart.SeriesCollection(4).XValues = "='¤u§@ªí1 (2)'!$A$2:$A$20000"
    ActiveChart.SeriesCollection(4).Values = "='¤u§@ªí1 (2)'!$T$2:$T$20000"
    ActiveChart.SeriesCollection(4).AxisGroup = 2

   ActiveChart.ApplyLayout (4)
   Dim zRg As Range
     Dim zChart As ChartObject
    Set zRg = Range("AP20:AU40")
   Set zChart = ActiveSheet.ChartObjects(3)
   With zChart
  .Top = zRg(1).Top
  .Left = zRg(1).Left
  .Width = zRg.Width
  .Height = zRg.Height
   End With



    ActiveChart.SetElement (msoElementChartTitleAboveChart)
    Selection.Caption = "Press. vs Throttle Position Variation"
   
    ActiveChart.SetElement (msoElementPrimaryValueAxisTitleRotated)
    Selection.Caption = "Press.(torr)"
   
    ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
    Selection.Caption = "Length(mm)"
   

    ActiveSheet.ChartObjects(3).Activate
    ActiveChart.Axes(xlCategory).Select
    ActiveChart.Axes(xlCategory).MinimumScale = 0
    ActiveChart.Axes(xlCategory).MaximumScale = 1100
    ActiveChart.Axes(xlCategory).MajorUnit = 100
    ActiveChart.Axes(xlCategory).MinorUnit = 50
    ActiveChart.SetElement (msoElementPrimaryValueGridLinesMajor)
    ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)
   
   
    End Sub
Ian

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD