changed: iif($d="E",$j[$g-1]
to: iif($d=E,$j[$g-1]

My code is now 423
_________________________
Home page: http://www.kixhelp.com/hb/