I have posted a small portion of the code below. I currently have my values hard coded into the program but I would like to have them refer to another sheet to make it easier to update in the future. I'm struggling to find a method that works any help would be greatly appreciated.
If grade = 1 Then
If (TSpsi >= 55000 And TSpsi <= 75000) And TSpsi > 1 Then
ElseIf (TSmpa >= 380 And TSmpa <= 515) And TSmpa > 1 Then
Else
MsgBox ("MTR is not valid! The tensile strength is outside the allowable range. Contact QA Engineer or QA Manager to write NCR.")
Exit Sub
End If
If YSpsi >= 30000 And YSpsi > 1 Then
ElseIf YSmpa >= 205 And YSmpa > 1 Then
Else
MsgBox ("MTR is not valid! The yield strength is below the minimum allowed. Contact QA Engineer or QA Manager to write NCR.")
Exit Sub
End If
If Elong8 >= 23 And Elong8 > 1 Then
ElseIf Elong2 >= 27 And Elong2 > 1 Then
Else
MsgBox ("MTR is not valid! The elongation percentage is below the minimum allowed. Contact QA Engineer or QA Manager to write NCR.")
Exit Sub
End If
If grade = 1 Then
If (TSpsi >= 55000 And TSpsi <= 75000) And TSpsi > 1 Then
ElseIf (TSmpa >= 380 And TSmpa <= 515) And TSmpa > 1 Then
Else
MsgBox ("MTR is not valid! The tensile strength is outside the allowable range. Contact QA Engineer or QA Manager to write NCR.")
Exit Sub
End If
If YSpsi >= 30000 And YSpsi > 1 Then
ElseIf YSmpa >= 205 And YSmpa > 1 Then
Else
MsgBox ("MTR is not valid! The yield strength is below the minimum allowed. Contact QA Engineer or QA Manager to write NCR.")
Exit Sub
End If
If Elong8 >= 23 And Elong8 > 1 Then
ElseIf Elong2 >= 27 And Elong2 > 1 Then
Else
MsgBox ("MTR is not valid! The elongation percentage is below the minimum allowed. Contact QA Engineer or QA Manager to write NCR.")
Exit Sub
End If