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

[µo°Ý] excel«ö¤é´Á§@ªº¤u§@ªí,¦p¦ó±N¤£¦P¤u§@ªí¤¤ªº¤é´ÁÄæ¦ì¤Î¨}²vÄæ¦ì§ì¥X§@¦¨§é½u¹Ï

[µo°Ý] excel«ö¤é´Á§@ªº¤u§@ªí,¦p¦ó±N¤£¦P¤u§@ªí¤¤ªº¤é´ÁÄæ¦ì¤Î¨}²vÄæ¦ì§ì¥X§@¦¨§é½u¹Ï

¥»©«³Ì«á¥Ñ showhi ©ó 2012-4-5 16:19 ½s¿è

Áὤ.zip (7.29 KB) excel«ö¤é´Á§@ªº¤u§@ªí,¦p¦ó±N¤£¦P¤u§@ªí¤¤ªº¤é´ÁÄæ¦ì¤Î¨}²vÄæ¦ì§ì¥X§@¦¨§é½u¹Ï

¦^´_ 1# showhi
½Ðªþ¤W Àɮ׸ê®Æ ¤~ª¾¦p¦ó§@

TOP

¦^´_ 1# showhi
²Ä1¦¸¥ÎVBA§@¹Ïªí,½Ð«ü¥¿
µ²½×:¹Ïªíª«¥ó¤Ó¦h,»yªkÃø°O,¤j¦h¥Î¿ý»sªº¤è¦¡¦A§@­×§ï

1.¦Û¦æ·s¼W"¹Ïªí"¤u§@ªí

2.°õ¦æ Sub XX()
  1. Sub XX()
  2. With Sheets("¹Ïªí")
  3.   .[A1] = "¤é´Á"
  4.   .[B1] = "¨}²v"
  5.   .[A2:B65536] = ""
  6.   For Each Sh In Sheets
  7.     If Sh.Name <> "¹Ïªí" Then
  8.       .[A65536].End(xlUp)(2) = Sh.Name
  9.       .[B65536].End(xlUp)(2) = 1 - Sh.[E26]
  10.     End If
  11.   Next
  12. End With
  13. Call ChartAdd
  14. End Sub
  15. Sub ChartAdd()
  16. With Sheets("¹Ïªí")
  17.   .ChartObjects.Delete                                 '§R°£¤u§@ªí¤º©Ò¦³¤w¦s¦b¤§¹Ïªíª«¥ó
  18.   R = .[A65536].End(xlUp).Row
  19.   Set DataRng = .Range("A" & 1 & ":B" & R)             '«ü©w¸ê®Æ½d³ò
  20.   Set ValueRng = .Range("B" & 2 & ":B" & R)            '«ü©w¼Æ­È½d³ò
  21.   Set XValueRng = .Range("A" & 2 & ":A" & R)           '«ü©wÃþ§O®y¼Ð¶b½d³ò
  22.   Set Rng = Range("D1:Z23")                            '«Ø¥ß·s¹Ïªí¨Ã«ü©w¦ì¸m¤Î¤j¤p
  23.   Set mychart = .ChartObjects.Add(Rng(1).Left, Rng(1).Top, Rng.Width, Rng.Height)
  24.   With mychart.Chart
  25.     .ChartType = xlLine                                '«ü©w¹ÏªíÃþ«¬
  26.     .SetSourceData Source:=ValueRng, PlotBy:=xlColumns '«ü©w¼Æ­È½d³ò»P¼Æ¦C¸ê®Æ¨ú¦ÛÄæ©Î¦C
  27.     .ApplyDataLabels ShowValue:=True                   '³]©wÅã¥Ü¸ê®Æ¼ÐÅÒ
  28.     .HasTitle = True                                   '³]©wÅã¥Ü¼ÐÃD»P¨ä¤º®e
  29.     .ChartTitle.Text = "Áὤ"
  30.     With .ChartTitle.Font                              '³]©w¼ÐÃD¤§®æ¦¡
  31.       .Size = 14
  32.       .ColorIndex = 3
  33.       .Name = "·s²Ó©úÅé"
  34.     End With
  35.     With .ChartArea.Interior                           '³]©w¹Ïªí°Ï¤§®æ¦¡
  36.       .ColorIndex = 8
  37.       .PatternColorIndex = 1
  38.       .Pattern = xlSolid
  39.     End With
  40.     With .PlotArea.Interior                            '³]©wø¹Ï°Ï¤§®æ¦¡
  41.       .ColorIndex = 35
  42.       .PatternColorIndex = 1
  43.       .Pattern = xlSolid
  44.     End With
  45.     With .SeriesCollection(1).DataLabels               '³]©w¼Æ¦C1(¨}²v)¤§®æ¦¡
  46.       .Font.Size = 10
  47.       .Font.ColorIndex = 5
  48.       .NumberFormatLocal = "0.0%"
  49.       .Position = xlLabelPositionAbove
  50.     End With
  51.     With .SeriesCollection(1).Border
  52.       .ColorIndex = 3
  53.       .Weight = xlThick
  54.        .LineStyle = xlContinuous
  55.     End With
  56.     With .SeriesCollection(1)
  57.       .MarkerBackgroundColorIndex = 3
  58.       .MarkerForegroundColorIndex = 2
  59.       .MarkerStyle = xlCircle
  60.       .Smooth = True
  61.       .MarkerSize = 10
  62.       .Shadow = False
  63.     End With
  64.     With .Axes(xlCategory).TickLabels                  '³]©wÃþ§O®y¼Ð¶b¤§®æ¦¡
  65.       .AutoScaleFont = False
  66.       .Font.Name = "·s²Ó©úÅé"
  67.       .Font.Size = 12
  68.       .Alignment = xlCenter
  69.       .Offset = 50
  70.       .Orientation = xlVertical
  71.     End With
  72.     With .Axes(xlValue)
  73.       .TickLabels.AutoScaleFont = False
  74.       .MinimumScale = 0.9
  75.       .MaximumScale = 1
  76.     End With
  77.     With .Axes(xlValue).TickLabels
  78.       .Font.Name = "·s²Ó©úÅé"
  79.       .Font.FontStyle = "¼Ð·Ç"
  80.       .Font.Size = 12
  81.       .NumberFormatLocal = "0.00_ "
  82.     End With
  83.     .SeriesCollection(1).XValues = XValueRng
  84.   End With
  85. End With
  86. End Sub
½Æ»s¥N½X
3.µ²ªG

TOP

        ÀR«ä¦Û¦b : ¯àµ½¥Î®É¶¡ªº¤H¡A¥²¯à´x´¤¦Û¤v§V¤Oªº¤è¦V¡C
ªð¦^¦Cªí ¤W¤@¥DÃD