回答編集履歴
3
MsgBox (26.26 - 26)追記
test
CHANGED
@@ -48,6 +48,8 @@
|
|
48
48
|
|
49
49
|
'-----------------------------------
|
50
50
|
|
51
|
+
MsgBox (26.26 - 26)
|
52
|
+
|
51
53
|
End Sub
|
52
54
|
|
53
55
|
```
|
2
varへ変更
test
CHANGED
@@ -18,31 +18,31 @@
|
|
18
18
|
|
19
19
|
'-----------------------------------
|
20
20
|
|
21
|
-
Dim
|
21
|
+
Dim varA As Range
|
22
22
|
|
23
|
-
Dim
|
23
|
+
Dim varB As Range
|
24
24
|
|
25
|
-
|
26
25
|
|
27
|
-
Set dblA = Range("A1")
|
28
26
|
|
29
|
-
Set
|
27
|
+
Set varA = Range("A1")
|
30
28
|
|
31
|
-
|
29
|
+
Set varB = Range("B1")
|
32
30
|
|
33
|
-
|
31
|
+
varA = 0.3
|
34
32
|
|
35
|
-
|
33
|
+
varB = 0.1 + 0.2
|
34
|
+
|
35
|
+
|
36
36
|
|
37
37
|
'計算差額のチェック
|
38
38
|
|
39
|
-
If
|
39
|
+
If varA.Value = varB.Value Then
|
40
40
|
|
41
41
|
MsgBox "一致"
|
42
42
|
|
43
43
|
Else
|
44
44
|
|
45
|
-
MsgBox "不一致 ⇒ " &
|
45
|
+
MsgBox "不一致 ⇒ " & varA & " - " & varB
|
46
46
|
|
47
47
|
End If
|
48
48
|
|
1
変更
test
CHANGED
@@ -28,15 +28,13 @@
|
|
28
28
|
|
29
29
|
Set dblB = Range("B1")
|
30
30
|
|
31
|
-
|
32
|
-
|
33
31
|
dblA = 0.3
|
34
32
|
|
35
33
|
dblB = 0.1 + 0.2
|
36
34
|
|
37
35
|
|
38
36
|
|
39
|
-
'計算差額
|
37
|
+
'計算差額のチェック
|
40
38
|
|
41
39
|
If dblA.Value = dblB.Value Then
|
42
40
|
|