See attached. The yellow filled cells are the output I'm looking for.
I need a formula in cells P3:CQ3 that looks at the range A3:M3. If a number appears in the latter range, then if the number is for example 2 then in cell Q3 in the attached file the return should be 5. (It will always be the number 5 that I'd want returned).
Easiest to check out the attachment and scroll to the right to see all desired outputs from the sample range.
Bookmarks