Saladsamurai
08-26-2009, 06:10 AM
I want to check the contents of each cell in "Output" and if there is a "c" in a cell and the corresponding cell in "Cold CI ISX" is NOT BLANK, then to message box the cell indices.
But it is message boxong Every cell starting at (1,1)
Sub CheckCopyPaste()
Dim i, j As Integer
For i = 1 To 25
For j = 1 To 50
If (Worksheets(2).Cells(i, j) = "c" & Worksheets(3).Cells(i, j) <> "") Then
MsgBox "There is a Problem in Cell " & i & ", " & j
End If
Next j
Next i
End Sub
But it is message boxong Every cell starting at (1,1)
Sub CheckCopyPaste()
Dim i, j As Integer
For i = 1 To 25
For j = 1 To 50
If (Worksheets(2).Cells(i, j) = "c" & Worksheets(3).Cells(i, j) <> "") Then
MsgBox "There is a Problem in Cell " & i & ", " & j
End If
Next j
Next i
End Sub