There are four transparent shapes on the worksheet myBox1, myBox2, myBox3 and myBox4
I want to fill yellow color in random shapes based on values in H4 and I4.
In the attached sample attachment, H4 value is M3. So except the box corresponding to M3, any two of the remaining boxes (1,2 or 4) should be filled with yellow color. Any two becuase, value of I4 is 2.
Another example:
Lets say H4 value is M2 and I4 value is 1 then
any one box should be filled with yellow color except the box corresponding to M2
The logic what I thought is:
I would have random numbers to the left of every box (marked in red in the attachment)
value in H4 would depend who will get a negative random number
From the remaining, check the two maximum numbers with the LARGE function and identify which box to fill
Challenge:
I have tried different ways to do this. However, not getting the syntax right to identify the box. Once the boxes are identified, it will be easier to fill.
Bookmarks