View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Can Conditional Formatting do this?

On Apr 9, 9:34 am, Tmaxx02 wrote:
I have numbers in rows d3 through f22:

D3 E3 F3
9 1 6
1 9 0

etc.

In d26 and E26 I have to cell that I can input numbers into:

1 9

I would like to highlight the cells with only thoses numbers, in this
case 1, and 9, but not the 6 or the 0. In other words, I want to
highlight only the cells in the row that I have inputted, and only if
the row contains both numbers.

Thanks, Terry


Select D3:F22 then, in the "Formula Is" part of the conditional
formatting dialogue try...

=AND(COUNTIF($D3:$F3,$D$26)+COUNTIF($D3:$F3,$E$26) 1,OR(D3=$D$26,D3=$E
$26))

This works but there could very well be a simpler formula that
highlights the cells containing the inputted values in rows that have
both values.

Ken Johnson