need a formula to distribute the values of two ranges on the another Range based on cond.

I Have two ranges; Range 1 K5:L8, Range 2, O5:Q8.
I need to distribute the values of Both ranges on another Rang 3, B6:B15 based on matching and the value of Q (Q5:Q8) such that if the value cell Q is 1, the name in the range B6:B15 has the value 50 otherwise it takes its value from L5:L8


 Attached Files
1 Reply
best response confirmed by ajl_ahmed (Contributor)


Range 1 and Range 2 only has Names 1 to Names 4.

B6:B15 also has Names 5 to Names 10. Should we leave their value empty?

If so, enter the following formula in C6:




and fill down.