How can I conditionally format an entire row in Excel based upon the data in one of the columns in that row?
February 1, 2008 5:33 PM Subscribe
How can I conditionally format an entire row in Excel 2007 based upon the contents of a particular column in that row?
posted by ChasFile to Computers & Internet (8 answers total) 2 users marked this as a favorite
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)]:
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:
Total n00b0 question, I'm sure, but I don't spend much time in Excel, and am would very much appreciate the help. Thanks!