Discussion Locked

Automatically assign color in Excel

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Greetings,

I have an Excel spreadsheet with a number of rows and columns (cells). For the sake of this example, I?ll say it has 20 rows (across) and 10 columns (up and down) ? although those numbers will change. In the 10th column (or always the last one on the right) is a value that includes a number representing a percentage of project completion, i.e. 50% preliminary, 75% check, 100% final, etc. Based on the number included in that value, I would like to assign a corresponding color for that entire row. For example, if that number is 50%, I would like all values entered for that entire row to be blue. If that number is 100%, I would like the entire row to be red, and so on. There will be four or five different numbers that I would like to correspond to four or five different colors. I might throw in this possibility: Whether the values are changed to a certain color or the entire row is shaded in that color makes no difference. I do want it to be ?automatic?, however.

How canI set the definitions for that spreadsheet to assign a color for the entire row based on which number is included in the value entered in a single cell?

I would like to accomplish this in a simple way, if possible, avoiding more complicated external macros. I?m open, however, to any and all suggestions. I might also add (if revealing my ignorance is of any consequence) that I am not by any means ?Excel literate?. I plan to pass on the responses to our resident Excel ?expert? to integrate into this particular spreadsheet. (All I do is enter the values.)

Also, if I need to clarify anything, post the questions you have in the answer section, and we can complete the dialogue in the comments sections. In other words, I won?t simply ?reject? an ?unfinished? answer. Or, feel free to email me with questions if necessary for clarification.

Thanks to all,

Maxwell

7 replies

by don christner

Hi Maxwell,

Have your Excel expert look at the conditional formating area under format on the main toolbar. It's fairly easy to do.

Don

by maxwell edison

Thanks for taking time to answer my question. However, we already knew where to look (I didn't really state that, did I?), but were struggling a bit with what to do. (See my comment in answer number two.)Nonetheless, thanks for your time. I do appreciate it.

Maxwell

by chainsawz

You can use conditional formatting to accomplish this. Just highlight the cells in the row you want to change colors, and click on 'format' - ' conditional formatting'. Change condition 1 to 'Formula is' and in the empty window type the cell in the column you want to evaluate (ex: =$H$8=100%). Then click on the format button, and the patterns tab, and select the background color.
So, with H1 thru H7 highlighted, this conditional formatting will look at the value of H8, and if it is 100% H1 thru H7 will become the color you selected.

To add conditions for other amounts, and colors, just click on the 'add' button in the conditional formatting dialog box, and follow the same steps - make the next formula read =$H$8=50%, and select another background color?and so on.

For more information you might want to check out this site http://www.cpearson.com/excel/cformatting.htm (remove any spaces)

I hope this helps!!

by maxwell edison

Thanks for providing such a thorough answer. It didn't work, however.

I'm not sure why, but the color format doesn't seem to apply even though everything appears to be entered correctly. I've read that some conditional formatting may not work with "rich text" cells (MS KB Q211901). I'm not sure if that is what's causing my problem - I'm not exactly sure what "rich text" is - but I'm looking into it.

You seem to be knowledgeable enough with Excel. Would you mind if I emailed you with a more specific question or two if any come up? I'd be happy to award you with some more "points" for your trouble.

Thanks for taking the time to help with my question.

Maxwell

by maxwell edison

Thank you, Willie, for taking the time to provide me with some very informative links. They will indeed help with my ongoing education with Excel.

Maxwell

This discussion is closed to new replies.