Reputation: 5
I have a "master list". We'll say it looks like so:
A | C | E
B | D | F
Next we have a larger list like so:
A | C | E
A | D | E
B | D | E
In the master list, I want to be able to highlight A or B, and all A's or B's in the column below will be subsequently highlighted the same color. Then I want to move on to C and D with the same results.
I have done some research and I believe Conditional Formatting may be the way to go here, but I'm not sure. I also thought about VLOOKUP, but I'm very new to the formula.
Upvotes: 0
Views: 2425
Reputation: 1584
So, for the generic condition you initially asked, there are ways to do this using a VBA macro, but even they are not perfect, and they can get very complicated. In fact, there is no direct way in Excel to check to see if the color of a cell has changed (See here: Capturing Cell Color Change). I think the simplest thing to do would be to change the way you do things slightly, and it will work better for your application.
Add a row (or two, if you want a blank one for separation) above your columns. In row A, you will type the name of the winning team - then all of the values below will highlight based on whether it is the winning team or the losing team.
To do this:
=A$1
(EXACTLY AS WRITTEN). In the right box, select the highlighting you want for the winning team. =A$1
(EXACTLY AS WRITTEN). When the winning team is decided, type the winners into Row A, and the highlighting will occur automatically (Note: this will assume they're all losers until you enter a winner).
FYI: The dollar sign "anchors" that column or row (row 1 in this case). So as it checks each cell, it always checks row 1, but since the A doesn't have the dollar sign, it will check the column it is in.
I think this is the best solution for your situation. If you still want to get the answer to exactly what you asked (or at least closer to it) and you're not afraid to dive into macros, let me know and I can post some code that might work for you.
Upvotes: 0