View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Activate data according to the value key in in other cell.

On May 4, 6:14 pm, "
wrote:
Hi

I need to activate data according to the value key in in other cell.
eg:

If Then
A 1 2
B 1 3
C 2 3
D 1 2 3

if the value is A then 1 and 2 should be highlighted
and if B then 1 and 3,
if C then 2 and 3
and if D then 1,2 and 3 should be highlighted or viewed


Maybe Conditional Formatting??

Say A,B,C or D can be in $A$1, 1 in $B$1, 2 in $C$1 and 3 in $D$1
Then, after selecting $B$1, go Format|Conditional formatting to bring
up the Conditional formatting dialog. Select Formula Is then use this
formula...

=$A1="C"

Then Format the font to be the same color as the cell background color
(most likely white) then click OK.

Repeat for cell $C$1 using this formula...

=$A1="B"

Repeat for cell $D$1 using this formula...

=$A1="A"

With this formatting in place; when $A$1 = A, only the 1 in $B$1 and
the 2 in $C$1 will be visible; when $A$1 = "B", only the 1 in $B$1 and
the 3 in $D$1 will be vissible, when $A$1 = C, only the 2 in $C$1 and
the 3 in $D$1 will be visible; when $A$1 = D the 1 in $B$1, the 2 in $C
$1 and the 3 in $D$1 will all be visible.

Ken Johnson