How can I conditionally format an entire row in Excel 2007 based upon the contents of a particular column in that row?
Say row 1 column J, row 4 column J, and row 19 column J all contain "Alice." I'd like rows 1, 4, and 19 all to appear with a red background. Say row 2 column J, row 44 column J, and row 45 column J all contain "Bob." I'd like for rows 2, 44, and 45 all to appear with a blue background. And so forth.
Basically, what I'm asking is how to make a relative column reference in a formula. I remember doing precisely this using VBScript for Excel years ago, but for the life of me can't locate that old code. Anyway, something along the lines of the following psuedo-code entered into the Conditional Formatting dialog box:
Apply "Format 1" according to the following formula [assuming (y,x) refers to (column y, row x)]:
=IF((J,ROW())="Alice")
It might also be nice to do this with a named range, so that if I apply the name "First_Name" to the entirety of row J, the formula is then a bit clearer:
=IF((First_Name,ROW())="Alice")
Total n00b0 question, I'm sure, but I don't spend much time in Excel, and am would very much appreciate the help. Thanks!
=($J1="Alice"). After applying this conditional format if you now go and examine the conditional formating of a particular cell, for instance cell C3, you'll see that it has a condition formatting formula of=($J3="Alice").posted by RichardP at 6:01 PM on February 1, 2008 [1 favorite]