Afraid I've been distracted from /. for quite a while, and have just returned to find a comment from you on my last journal entry - now archived and un-add-to-able, hence this new entry for my (horribly boring) reply. Anyway, the changing-cell-colour-to-a-grey-scale-value-roughly-equivalent-to-the-cell's-numerical-value-in-relation-to-the-min-and-max-of-the-range macro did originally have a purpose when it was written, which was to try to help my PHB visualise trends in data where there was time-of-day in fifteen minute increments in one direction, and date (from 1 Jan->31 Dec) in the other direction, and the built-in charts all looked horribly cluttered (the surface ones weren't quite suitable, as the data could be quite "bumpy", making parts of the surface end up behind other parts of the surface, no matter which way you tried to turn it. (The greyscale has since been replaced with an absolutely hideous palette going from blue via red to white). The macro as it stands here is of course the "first draft", written without editing or pre-planning, hence the atrociousness of it (no dims, no error-trapping, it just dies horribly if there're any cells with text in them in the range).
With reasonably "smooth" data (or any brightly coloured worksheet) the following is sort-of-fun-and-annoying at the same time (if your machine doesn't flicker too much when changing the palette in Excel)...
sub cyclecolor
dim RuGBy(3)
while god=dead
for palno=1 To 24
unseperated=activeworkbook.colors(palno)
rugby(1)=unseperated-(256*int(unseperated/256))
rugby(2)=int(unseperated/(256^2))
rugby(3)=(unseperated-rugby(1)-(rugby(2)*(256^2)))/256
for prim=1 to 3
rugby(prim)=rugby(prim)-(((rugby(prim) mod 2)-0.5)*16)
if abs(rugby(prim)-127.5)>127.5 then rugby(prim)=rugby(prim)-(((rugby(prim) mod 2)-0.5)*18)
next
activeworkbook.colors(palno)=RGB(rugby(1),rugby(2),rugby(3))
next
wend
end sub
Ahem, I mean... (Score:1)