Search code examples
excelexcel-formulaconditional-formatting

Conditional Formatting by row on a large selection in Excel


I'm trying to use conditional formatting to format a table of data. The functionality I need is basically if you put "done" in a cell at the end of the row, all of the text in the other cells to the left of it will be crossed out, and I want to make this true for all of the rows in the table using one formatting rule. I know I could do this by adding a new rule for each row, but there's obviously a quicker way, I'm just not sure which formula to use. I think I might need to use Visual Basic but I've got no clue how to use that so I'm lost. FYI I'm using the desktop version of Excel for Office 365.

I tried using what I found below but it didn't work: https://superuser.com/questions/38885/is-there-a-way-to-use-conditional-formatting-on-a-row-based-on-values-in-a-singl


Solution

  • No need for VBA. In this example:

    Sample spreadsheet

    use the formula =$F1="Done" for conditional formatting for Row 1. Apply it to cells =$A$1:$F$6. Set those for your needs, of course. Or apply it to =$A$1:$E$6 if you don't want the "Done" crossed out!

    Conditional format dialog