Shading cells based on Other Sheet Value?

  • Thread starter Thread starter RustyR
  • Start date Start date
R

RustyR

I have a workbook that has dropdowns with Yes and No answers.

Is there a way to select a range of cells in another worksheet (some of
which may be merged) and Format those cells with a patter based on a Yes or
No answer in another worksheet?

I ran a macro to do it and got this but I don't know what to do with it or
how to correlate it with say, Requestor!B10 (example).

Sub ShadeCell()
Range("B15:V18").Select
With Selection.Interior
..ColorIndex = 2
..Pattern = xlGray25
..PatternColorIndex = xlAutomatic
End With
End Sub

Thank you in advance.
Rusty
 
Rusty,

You can use Conditional Formatting from the Formatting menu.

Experiment first using CF where the cells to be patterned and the "yes no"
cell are in the same sheet. Having the source in another sheet requires
that you name the "yes no" cell and then refer to the name in the
Conditional Formatting dialog box. For example, with a cell named
"yes_or_no" in Sheet 1, the formula in the Conditional Formats dialog box
for a group of cells in Sheet 2 is:

=yes_or_no="yes"

hth,

Doug Glancy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top