質問編集履歴
4
グラフ追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,4 +86,18 @@
|
|
86
86
|
|
87
87
|
---------------------------------
|
88
88
|
|
89
|
-

|
89
|
+

|
3
イメージ追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
2
イメージ追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -85,3 +85,5 @@
|
|
85
85
|
|
86
86
|
|
87
87
|
---------------------------------
|
88
|
+
|
89
|
+

|
1
コード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -23,3 +23,65 @@
|
|
23
23
|
これは、一つ一つ修正するしかないのでしょうか?
|
24
24
|
|
25
25
|
マクロ等では、おしりが違う場合一気に揃える技はないでしょうか?
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
---------------------------------------------
|
30
|
+
|
31
|
+
Sub graph_change()
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
Dim wb As Workbook, ws As Worksheet
|
36
|
+
|
37
|
+
Dim str1 As String, str2 As String, i As Integer, j As Integer
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
str1 = InputBox("変更前の値を入力してください")
|
42
|
+
|
43
|
+
If str1 = "" Then Exit Sub
|
44
|
+
|
45
|
+
str2 = InputBox("変更後の値を入力してください")
|
46
|
+
|
47
|
+
If str2 = "" Then Exit Sub
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
On Error Resume Next
|
52
|
+
|
53
|
+
For Each wb In Workbooks
|
54
|
+
|
55
|
+
For Each ws In wb.Worksheets
|
56
|
+
|
57
|
+
For j = 1 To ws.ChartObjects.Count
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
With ws.ChartObjects(j).Chart
|
62
|
+
|
63
|
+
For i = 1 To wb.Worksheets.Count
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
.SeriesCollection.Item(i).Formula = _
|
68
|
+
|
69
|
+
Replace(.SeriesCollection.Item(i).Formula, "$" & str1, "$" & str2)
|
70
|
+
|
71
|
+
Next i
|
72
|
+
|
73
|
+
End With
|
74
|
+
|
75
|
+
Next j
|
76
|
+
|
77
|
+
Next ws
|
78
|
+
|
79
|
+
Next wb
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
End Sub
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
---------------------------------
|