回答編集履歴
2
コードミス
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
If ActiveSheet.Cells(i, 2).Value = ActiveSheet.Cells(i, 8).Value Then
|
32
32
|
|
33
|
-
ActiveSheet.Cells(i,
|
33
|
+
ActiveSheet.Cells(i, 8).Interior.Color = xlNone
|
34
34
|
|
35
35
|
Else
|
36
36
|
|
1
=の場合を追加
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
一例として
|
2
2
|
|
3
|
-
この場合ですとB列の空白
|
3
|
+
この場合ですとB列の空白のセルまで繰り返す形ですので途中に空白があった場合はそこで終わってしまいますが
|
4
4
|
|
5
5
|
|
6
6
|
|
@@ -16,17 +16,25 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
If ActiveSheet.Cells(i, 2).Value
|
19
|
+
If ActiveSheet.Cells(i, 2).Value = ActiveSheet.Cells(i, 5).Value Then
|
20
20
|
|
21
|
+
ActiveSheet.Cells(i, 5).Interior.Color = xlNone
|
22
|
+
|
23
|
+
Else
|
24
|
+
|
21
|
-
ActiveSheet.Cells(i, 5).Interior.Color = vbYellow
|
25
|
+
ActiveSheet.Cells(i, 5).Interior.Color = vbYellow
|
22
26
|
|
23
27
|
End If
|
24
28
|
|
25
29
|
|
26
30
|
|
27
|
-
If ActiveSheet.Cells(i, 2).Value
|
31
|
+
If ActiveSheet.Cells(i, 2).Value = ActiveSheet.Cells(i, 8).Value Then
|
28
32
|
|
33
|
+
ActiveSheet.Cells(i, 5).Interior.Color = xlNone
|
34
|
+
|
35
|
+
Else
|
36
|
+
|
29
|
-
ActiveSheet.Cells(i, 8).Interior.Color = vbYellow
|
37
|
+
ActiveSheet.Cells(i, 8).Interior.Color = vbYellow
|
30
38
|
|
31
39
|
End If
|
32
40
|
|