alexandro88
11-08-2011, 07:56 AM
LValue = Format(Cells(1, 17).Value, "d - mmm - yy")
Myday = Format(LValue, "dddd")
If Myday = InStr(1, Left(rngcell.Value, 5), "Sun" Or "Sat" Or "Mon" Or "Tue" Or "Wed" Or "Thu" Or "Fri") Then
If InStr(1, Left(rngcell.Value, 3), "LRR") Then
Cells.Value = lr_Total
ElseIf InStr(1, Left(rngcell.Value, 3), "OP3") Then
Cells.Value = zResult_Total_NSOP
ElseIf InStr(1, Left(rngcell.Value, 3), "OP4") Then
Cells.Value = vResult_Total_NSOP
ElseIf InStr(1, Left(rngcell.Value, 3), "OL3") Then
Cells.Value = vResult_Total_NSOL
ElseIf InStr(1, Left(rngcell.Value, 3), "OL4") Then
Cells.Value = zResult_Total_NSOL
End If
End If
I get error for that red line. Anyone can help me?
Myday = Format(LValue, "dddd")
If Myday = InStr(1, Left(rngcell.Value, 5), "Sun" Or "Sat" Or "Mon" Or "Tue" Or "Wed" Or "Thu" Or "Fri") Then
If InStr(1, Left(rngcell.Value, 3), "LRR") Then
Cells.Value = lr_Total
ElseIf InStr(1, Left(rngcell.Value, 3), "OP3") Then
Cells.Value = zResult_Total_NSOP
ElseIf InStr(1, Left(rngcell.Value, 3), "OP4") Then
Cells.Value = vResult_Total_NSOP
ElseIf InStr(1, Left(rngcell.Value, 3), "OL3") Then
Cells.Value = vResult_Total_NSOL
ElseIf InStr(1, Left(rngcell.Value, 3), "OL4") Then
Cells.Value = zResult_Total_NSOL
End If
End If
I get error for that red line. Anyone can help me?