This should fix your code:
Sub Adjust()
Dim Pattern As Integer
Pattern = Sheets("Info").Range("R7").Value
If Pattern = 1 Then Call OneCrew
If Pattern = 2 Then Call TwoCrew
If Pattern = 3 Then Call ThreeCrew
If Pattern = 4 Then Call OneCrew
If Pattern = 5 Then Call TwoCrew
If Pattern = 6 Then Call ThreeCrew
End Sub
another approach would use Select Case
Sub Adjust()
Dim Pattern As Integer
Pattern = Sheets("Info").Range("R7").Value
Select Case Pattern
Case Is = 1, 4
Call OneCrew
Case Is = 2, 5
Call TwoCrew
Case Is = 3, 6
Call threecrew
End Select
End Sub
Rather than trying to understand all the variations of Block If's (I'm not sure what an ElseIf statment does), I stick to the basic sytles that I understand.
If condition Then instruction (non-block)
AND
If ..... Then
instructions one
(optional)
Else
instructions two
(halt optional)
End If
Everything else can be done with these two.
Bookmarks