PolkManiac
MIS
I have the following series of IF statements in one formula, but when I try to save it's telling me that "The remaining text does not appear to be a part of the formula", and selects everything after the first If...Else statement.
I would think this could be avoided with the EndIf command, but that doesn't appear to be working either. When I leave just the first IF statement there, it runs correctly, but when I try to add the EndIf it highlights the EndIf and gives me that same message.
HELP!!
If DayOfWeek (CurrentDate) = 1 or DayOfWeek (CurrentDate) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 1) = 1 or DayOfWeek (CurrentDate - 1) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 2) = 1 or DayOfWeek (CurrentDate - 2) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 3) = 1 or DayOfWeek (CurrentDate - 3) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 4) = 1 or DayOfWeek (CurrentDate - 5) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 5) = 1 or DayOfWeek (CurrentDate - 5) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 6) = 1 or DayOfWeek (CurrentDate - 6) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 7) = 1 or DayOfWeek (CurrentDate - 7) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 8) = 1 or DayOfWeek (CurrentDate - 8) = 7 Then
+ 0
Else
+ 1
I would think this could be avoided with the EndIf command, but that doesn't appear to be working either. When I leave just the first IF statement there, it runs correctly, but when I try to add the EndIf it highlights the EndIf and gives me that same message.
HELP!!
If DayOfWeek (CurrentDate) = 1 or DayOfWeek (CurrentDate) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 1) = 1 or DayOfWeek (CurrentDate - 1) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 2) = 1 or DayOfWeek (CurrentDate - 2) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 3) = 1 or DayOfWeek (CurrentDate - 3) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 4) = 1 or DayOfWeek (CurrentDate - 5) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 5) = 1 or DayOfWeek (CurrentDate - 5) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 6) = 1 or DayOfWeek (CurrentDate - 6) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 7) = 1 or DayOfWeek (CurrentDate - 7) = 7 Then
+ 0
Else
+ 1
If DayOfWeek (CurrentDate - 8) = 1 or DayOfWeek (CurrentDate - 8) = 7 Then
+ 0
Else
+ 1