Change Cell Color to Gradient Based on Adjacent Cell Colors
I have a color based chart, and want to make a button which will blend all the selected cells (With.Selection.Interior) by creating a gradient based on the cells on the right and left of the selected cell. For example,
Cell B4=Yellow
Cell B6=Red
I want cell B5 to be a gradient from yellow into red. This will all be activated by a button, no need for automation.
**To clarify, the adjacent cell colors will already be selected manually by the user.
I have tried several different ways of going about it, but the bottom line is I can't set cell colors based on relative cells. Thanks in advance.
(I cannot attach the chart for proprietary reasons, sorry)
Re: Change Cell Color to Gradient Based on Adjacent Cell Colors
You sir, are a genius. It's so simple, it's beautiful.
If you can answer the follow up, you will make my life perfect.
When selecting multiple cells with the same adjacent cell colors (i.e. A1 and B1 are green, A3 and C3 are yellow), it works perfectly.
However, if multiple cells are selected, and adjacent cells are different colors (i.e A1 is yellow and A3 is green, but C1 is red and C3 is purple), then the return is black.
I am only using three colors (red, yellow, and green) in the sheet. Is there any way to complete multiple gradient shifts at once?
Bookmarks