e.g. 2,2,2,2,2,3,3,3,3,3,3,3
I have varOne = 5 and VarTwo = 2
I want to know if the array has 5
elements which contain 2.
This code
Code: Select all
put 0 into bOn
repeat with i = 1 to 12
if sHits[i] = Var2 then
add 1 to bOn
end if
end repeat
Then I want to set the backgroundColor of
the fields containing 2 to red with this
Code: Select all
if bOn = Var1 then
repeat with k = 1 to 12
if sHits[k] = Var2 then
set the backgroundColor of field ("fldS" & k) to red
end if
end repeat
else
etc...
backgroundColor set to red when only the five
containing 2 should be.
Any help appreciated.