|
▼IROC さん:
>どこにでしょうか?
msgboxです。
ちなみに今はこのようなマクロを考えているのですが、もっとうまい方法があればと思い質問しました。
Dim G_cont As Integer
Dim G_Name As String
Dim G_Bank As String
Dim G1 As Integer
Dim G2 As Integer
Dim G3 As Integer
Dim G4 As Integer
Dim G5 As Integer
Dim G6 As Integer
Dim G7 As Integer
Dim G8 As Integer
Dim G9 As Integer
Dim G10 As Integer
Dim G11 As Integer
Dim G12 As Integer
Dim WrngG1 As Integer
G_cont = Worksheets("Sheet12").Range("A65536").End(xlUp).Row
G_Name = Worksheets("Sheet12").Cells(1, 1).Value
G_Bank = Worksheets("Sheet12").Cells(1, 2).Value
For G1 = 2 To G_cont
If G_Name = Worksheets("Sheet12").Cells(G1, 1).Value Then
If G_Bank <> Worksheets("Sheet12").Cells(G1, 2).Value Then
WrngG1 = 1
End If
ElseIf G_Name <> Worksheets("Sheet12").Cells(G1, 1).Value Then
G_Name = Worksheets("Sheet12").Cells(G1, 1).Value
G_Bank = Worksheets("Sheet12").Cells(G1, 2).Value
For G2 = G1 To G_cont
If G_Name = Worksheets("Sheet12").Cells(G2, 1).Value Then
If G_Bank <> Worksheets("Sheet12").Cells(G2, 2).Value Then
WrngG1 = 1
End If
ElseIf G_Name <> Worksheets("Sheet12").Cells(G2, 1).Value Then
G_Name = Worksheets("Sheet12").Cells(G2, 1).Value
G_Bank = Worksheets("Sheet12").Cells(G2, 2).Value
For G3 = G2 To G_cont
If G_Name = Worksheets("Sheet12").Cells(G3, 1).Value Then
If G_Bank <> Worksheets("Sheet12").Cells(G3, 2).Value Then
WrngG1 = 1
End If
ElseIf G_Name <> Worksheets("Sheet12").Cells(G3, 1).Value Then
G_Name = Worksheets("Sheet12").Cells(G3, 1).Value
G_Bank = Worksheets("Sheet12").Cells(G3, 2).Value
For G4 = G3 To G_cont
・
・
・
・
・
End If
Next G2
End If
Next G1
If WrngB1 = 1 Then
MsgBox "error"
End If
宜しくお願いいたします。
|
|