in english:
$=$+iif($b>$c,$c,$l)

should be:
$=$+iif($l>$c,$c,$l)
_________________________
!

download KiXnet