converting numbers to shades

Discussion in 'Trading Software' started by vladiator, Apr 14, 2004.

  1. Hi guys. I know some of you are Excel guru's so you probably can nail this question.

    Here's my problem. I have a program that spits out probabilities over a range of outcomes over time. I'm trying to convert these to shades of grey so one could eyeball them and see the clusterings etc.

    The way I had this set up was the following. After multiplying the probabilities by 255 and roundingoff the decimals, I then used
    GBR(#,#,#) function in VBA to color the sells. This seemed like a straightforward thing to do, but it turned out that for some bizaar reason the coloring is rather insensitive to the parameters. Going from black GBR(0,0,0) to white GBR(250,250,250), Excel can only reproduce some 4 or 5 shades. WFT? Am I missing something?
    If you scroll to the bottom of this site:
    - I believe these are the only shades I can get.
    I was hoping for a more continuous scheme where a probability of 0.27 would resut in a color a bit different than, say 0.32

    Any ideas???
  2. You have 56 colors to work with but you can customize those colors to 56 different shades of gray as follows:

    On the Tools menu, click Options, and then click the Color tab.

    Click the color you want to change, and then click Modify.

    To restore the default color palette, click Reset on the Color tab.

    Now you can make a visual basic script to change the color of a cell to any one of those 56 shades, for example:

    Sub ColorCell()
    Worksheets("Sheet1").Range("A1").Interior.ColorIndex = 33
    End Sub
  3. Thanks, Sam. I have a feeling this will do the trick.