I usually work on it until I solve it... googling the heck out of it. But it's been days with this one and I can't just figure out what I am doing wrong. Code: Show
Is not working. The macro runs and colors every cell in my r1 range BLACK! yes BLACK I don't get it. Any help will be appreciated GREATLY
This sets the whole range r2 to red Code:
for the colors that do not have a vbcolorname you can use RGB values to specify color and Code:
for no color it should be Code:
Something like this should work Code:
Thanks Scott... Code:
Result is... all the range of cells changes colors rapidly and when the macro ends... All cells in Column A are color-less. You are right... the code is changing the whole list to each color.... (??) hmmm
Ahhhhh got you!!! Code:
How do I change cell color based on another cell value in Excel?Apply conditional formatting based on text in a cell. Select the cells you want to apply conditional formatting to. Click the first cell in the range, and then drag to the last cell.. Click HOME > Conditional Formatting > Highlight Cells Rules > Text that Contains. ... . Select the color format for the text, and click OK.. Can you conditional format a cell based on the color of another cell?Excel's predefined conditional formatting, such as Data Bars, Color Scales and Icon Sets, are mainly purposed to format cells based on their own values. If you want to apply conditional formatting based on another cell or format an entire row based on a single cell's value, then you will need to use formulas.
How do I change the color of a cell in Excel VBA?Instructions:. Open an excel workbook.. Press Alt+F11 to open VBA Editor.. Insert a new module from Insert menu.. Copy the above code and Paste in the code window.. Save the file as macro enabled workbook.. Press F5 to execute the procedure.. You can see the interior colors are changing as per our code.. |