I am trying to make one message box to include passes and fails of samples.
All Ranges above 0.24 are a fail and below are a pass, and that to show in one box the passes and fails with correspondent sample #
The code below, show the boxes one by one and even incorrectly, some are blank and some not correct.
May you help me with this please. Thanks
Sub MsgB()
Dim x As Long
For x = 2 To 8
If Sheet2.Range("B" & x).Value < 0.24 Then
y = Sheet2.Range("A" & x).Value
MsgBox "Pass: " & y
Else
MsgBox "Fail: " & y
End If
Next
End Sub