I can't see anything wrong with LOOKUP2 by reviewing manual (experts might see something there though).

Code:
1126 If decsec > temp ;Temp var word
 1127 Storecalc = 0 ;Reset bit 
 1128 return
 1129 Endif
1. Missing THEN at end of IF statement

2. Why RETURN?

3. You can insert single commands directly in IF statement, like this:

Code:
If decsec > temp THEN Storecalc = 0
Robert