Copy automatically only the color from one cell to another- EXCEL VBA -
i have cell 017
, value , color of cell changing due formula , conditional formatting.
cell o16
changes due formula formula , values different cell 017
.
what want cell o16
contains same color of cell o17
automatically once value of cell 017
has changed.
there should solution in vba. hope help.
edit:
user simoco has came solution excel 2010 , later:
private sub worksheet_calculate() range("o16").interior.color = range("o17").displayformat.interior.color end sub
unfortunately use excel 2007, there , equivalent code in 2007?.
works excel 2010 , later
if cell o17
can changed only through formula, use following code (this code should used in sheet
module):
private sub worksheet_calculate() range("o16").interior.color = range("o17").displayformat.interior.color end sub
otherwise, add worksheet_change
event same code.
Comments
Post a Comment