Results 1 to 7 of 7

Filling colors in random shapes

Threaded View

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    85

    Filling colors in random shapes

    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.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Changing colors of shapes based on a click (VBA)
    By domexcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2014, 10:52 AM
  2. XY Scatter Chart: unique point colors and shapes
    By escobf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2013, 10:45 AM
  3. Changing Colors of Shapes
    By seckin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2011, 03:23 PM
  4. Colors of shapes and cells
    By mike cook in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2008, 10:59 AM
  5. VBA code to count colors/shapes?
    By Nimrod in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-08-2005, 01:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1