Still not sure why you've mentioned the named ranges in your original post, but try this - note you'll have to change the amount each text string is allocated and the cell references where the text string reside:
=IF(ISERROR(INDEX({10,20,30,40},MATCH(A2,{"cat","bat","jar","dog"},0))+INDEX({10,20,30,40},MATCH(A3,{"cat","bat","jar","dog"},0))+INDEX({10,20,30,40},MATCH(A4,{"cat","bat","jar","dog"},0))),0,INDEX({10,20,30,40},MATCH(A2,{"cat","bat","jar","dog"},0))+INDEX({10,20,30,40},MATCH(A3,{"cat","bat","jar","dog"},0))+INDEX({10,20,30,40},MATCH(A4,{"cat","bat","jar","dog"},0)))