I think you're asking for an OR based condition re: K5,K7 & K9 - as you have things presently your result will always be 0 given not all conditions can hold true simultaneously (ie E can not be K5,K7 & K9 at the same time)
Generally speaking ORs are calculated via addition in Arrays / Sumproduct eg:
=SUMPRODUCT(--(A2:A105=317),(E2:E105=K9)+(E2:E105=K5)+(E2:E105=K7),G2:G105)
In truth though your layout is not clear and there may be better alternatives - if you post a sample file I'm sure people can help you further.
Bookmarks