简体   繁体   中英

Conditional Formatting a Row based on cell value with Excel

I have looked at multiple sites that show how to do Conditional Formatting in Excel for a row based on a cell value. But all of them use equations as there formula. For example, if cell value is 5, highlight the row blue. I am trying to do it with text. If cell value is "Completed", highlight the row green.

This is the formula I was able to get from http://smallbusiness.chron.com/format-row-based-value-cell-excel-2007-40595.html

=INDIRECT("B"&ROW())>0

and modified it to

=INDIRECT("F"&ROW())="Completed"

Basically I would like the row (from column A to F) to be highlighted Green if cell value in F (whichever row)=Completed.

In my opinion the site you were using overcomplicated the issue by suggesting the "Indirect" function.

Instead, highlight your block of data (let's say A1:F10), and put in the following rule. Remember that conditional formatting is organized so that the formula is directed at the top-left cell in the selected area. So we will write this formula specifically for A1, keeping in mind that we want it to apply to all cells from A1:F10. To do that, we will need to keep "F" as the absolute column (because we only ever want to check F), but we will want to make row 1 a relative row (because we want to check the particular row that changes as the formatting moves down the data block.

This would look simply as follows:

=$F1="Completed"

However from the way your question is written, it looks like that should work, so something else is going on there. If my suggestion doesn't solve your issue then please provide an example of what your data actually looks like - for example, are you sure that the rows you applied the rule to include any cells where F(x) = "Completed"?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM