+ Reply to Thread
Results 1 to 2 of 2

VBA Macro for excel 2010 RGB heat map

  1. #1
    Registered User
    Join Date
    12-06-2011
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2010
    Posts
    1

    VBA Macro for excel 2010 RGB heat map

    I am attempting to create a heat map for revenue data. I am new to Excel/VB but enthusiastic enough to take on the challenge of creating a macro such as this:

    • Set the background color for cells b2:s20
    • Cell U2 defined how many colors to use (e.g., 10)
    • Cells U3:U5 defines the RGB color to use for the min values, and cells U6:U8 defines the colors to use for the max values. That is, U3=min R, U4=min G, U5=min B, U6=max R…
    • Divide the values of b2:s20 (min(b2:s20) through max(b2:s20)) into U2 number of segments. The first (min) segment gets the background color defined by RGB (U3,U4,U5), the last segment gets the background color (U6,U7,U8), and the intermediate segments get colors equality divided by R, G, and B.

    For example, U3:U5 might be (0,0,0) for black and U6:U8 might be (255,255,255) for white.

    Thanks in advance for any contributions.

  2. #2
    Registered User
    Join Date
    08-09-2011
    Location
    london,england
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: VBA Macro for excel 2010 RGB heat map

    http://ramblings.mcpher.com/Home/exc...ts/heatmap/lib

    Here's the code for how to do that. You can supply a number of milestone colors and it will supply the ramp gradient colors between them.

    Bruce

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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