troubleshooting Question

Excel Macro to Highlight Cells based on "Key" Cell Color

Avatar of D B
D BFlag for United States of America asked on
Microsoft Excel
11 Comments1 Solution435 ViewsLast Modified:
I hate being color-blind. I hate even more when people who aren't think the whole world isn't. I've recently started a new position and the previous developer designed an Excel sheet that has a 'key' column (Column L). This column has 18 rows, each cell having a different color, with a 'description' in the column to its right (column M). Column B has many table names, and column C is an empty cell with only a fill color, that corresponds to one of the 18 colors in Column L. I can't for the life of me decipher this.

I would like to write a macro that works two ways; when I click on one of the color-coded cells in column L, all cells in column B that have a matching fill color in column C will be selected. So, if I click on the cell in column L that has a light-blue fill color, all cells in column B that have a corresponding light-blue fill color in column C will be selected.

Likewise, if I click any table name (cell in column B) or its corresponding fill color in column C, the appropriate cell in column L will become selected.

(fyi, column A is an empty column with no data and other columns between C and L have various comment data and are of no interest).

I am not even sure it is possible to code events to a cell click, or how to go about this, so I am reaching out for assistance from the Excel macro gurus.

Thanks.

p.s. a potential solution might be to have a button on the sheet that I can press. If the active cell is in column L then select all cells in column B that macth the fill color of the active cell in column L. If the active cell is in columns B or C, then select the cell in column L that macthes the fill color of the cell in column C (active cell if the active cell is in column C, or fill color using an offest of +1 for the column if the active cell is in column B). This would work if Excel cannot act on a click event of a cell.
ASKER CERTIFIED SOLUTION
rspahitz

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros