Try this in AG3:
=SUMPRODUCT(IF(ISNUMBER(SEARCH("L",B3:AE3)),--SUBSTITUTE("L"&UPPER(B3:AE3),"L",0),0))-AF3
Confirmed with Ctrl-Shift-Enter