Home |
Search |
Today's Posts |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how do i fill cells with random color?
"Casey" wrote in message ... I am trying to fill a grid of equal sized cells with random colors, or colors attached to a random number. I can fill the grid with random numbers easily enough, it's the colors i want. Thanx....Casey Hi Casey Try this then adpat to your needs Sub colorit() Dim task As Range Dim myvalue Set task = Range("A1:l32") For y = 1 To 5 For Each Cell In task Randomize myvalue = Int((56 * Rnd) + 1) Cell.Interior.ColorIndex = myvalue Next Next ' End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I fill a block of 300 cells with non-repeating random #s | Excel Discussion (Misc queries) | |||
Fill and Font Color Drop Downs Mostly White with Random Colors | Excel Discussion (Misc queries) | |||
change fill color of a range of cells based on color of a cell? | Excel Programming | |||
fill random cells | Excel Programming | |||
fill random cells | Excel Programming |