C
ChipButtyMan
Hi,
I guess it would be better to use Select Case statement to do this
but I don't know how I would write the code.
MyVa is a variable that contains an integer (that represents a
workday)
Thank you for your help, time & expertise.
If Range("C" & i).Value = MyVa And Range("D" & i).Value = "Ready to
ship" Then
Range("E" & i).Value = "Right on time"
End If
If Range("C" & i).Value < MyVa And Range("D" & i).Value = "Ready to
ship" Then
Range("E" & i).Value = "Missed Code Date"
End If
If Range("B" & i).Value = MyVa + 1 And Range("D" & i).Value =
"Ready to ship" Then
Range("E" & i).Value = "One day early"
End If
If Range("B" & i).Value = MyVa + 2 And Range("D" & i).Value =
"Ready to ship" Then
Range("E" & i).Value = "Two days early"
End If
If Range("B" & i).Value = MyVa And Range("D" & i).Value =
"Outstanding work" Then
Range("E" & i).Value = "One day late"
End If
I guess it would be better to use Select Case statement to do this
but I don't know how I would write the code.
MyVa is a variable that contains an integer (that represents a
workday)
Thank you for your help, time & expertise.
If Range("C" & i).Value = MyVa And Range("D" & i).Value = "Ready to
ship" Then
Range("E" & i).Value = "Right on time"
End If
If Range("C" & i).Value < MyVa And Range("D" & i).Value = "Ready to
ship" Then
Range("E" & i).Value = "Missed Code Date"
End If
If Range("B" & i).Value = MyVa + 1 And Range("D" & i).Value =
"Ready to ship" Then
Range("E" & i).Value = "One day early"
End If
If Range("B" & i).Value = MyVa + 2 And Range("D" & i).Value =
"Ready to ship" Then
Range("E" & i).Value = "Two days early"
End If
If Range("B" & i).Value = MyVa And Range("D" & i).Value =
"Outstanding work" Then
Range("E" & i).Value = "One day late"
End If