brent.fraser
New Member
- Joined
- Aug 27, 2009
- Messages
- 41
Hi all,
For the life of me I cannot figure out why this isn't working:
basically it is incrementing t if the or statements are true and does not consider the first "From/To" value..... but that is the first part of the statement.
I even put a msgbox Worksheets("Service Order Themes").Range("A" & f).Value just before the t = t + 1 and it shows values that ARE NOT "From/To."
I found a work-around where I use 3 if statements (one for each "or") and it works.... what am I missing?
Thanks
B.
For the life of me I cannot figure out why this isn't working:
Code:
With Worksheets("Service Order Themes")
t = 0
For f = 2 To themeLastRow
If Worksheets("Service Order Themes").Range("A" & f).Value = "From/To" And _
Worksheets("Service Order Themes").Range("H" & f).Value = "Open" Or _
Worksheets("Service Order Themes").Range("H" & f).Value = "Assigned" Or _
Worksheets("Service Order Themes").Range("H" & f).Value = "Unassigned" Then
t = t + 1
End If
End With
basically it is incrementing t if the or statements are true and does not consider the first "From/To" value..... but that is the first part of the statement.
I even put a msgbox Worksheets("Service Order Themes").Range("A" & f).Value just before the t = t + 1 and it shows values that ARE NOT "From/To."
I found a work-around where I use 3 if statements (one for each "or") and it works.... what am I missing?
Thanks
B.