Auto colour based on adjacent cell

  • Thread starter Thread starter crapit
  • Start date Start date
C

crapit

How to set cell color automatically based on the color of another cell
 
How does the first cell get coloured? By Conditional formatting or
manually? If by conditional formatting then use he same conditin=ons to
change the second cell.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
the 1st cell's color is manually changed
Sandy Mann said:
How does the first cell get coloured? By Conditional formatting or
manually? If by conditional formatting then use he same conditin=ons to
change the second cell.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Unfortunately changing the cell colour will not fire a Worksheet_Change
procedure. You could do so with a SelectionChange or Calculate event.

Sorry.

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Sub colormatchothercell()
Set rangetocopy = Range("d1")
ActiveCell.Interior.ColorIndex = _
rangetocopy.Interior.ColorIndex
End Sub
 
Possible not to run on macro?

Don Guillett said:
Sub colormatchothercell()
Set rangetocopy = Range("d1")
ActiveCell.Interior.ColorIndex = _
rangetocopy.Interior.ColorIndex
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 

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