Detecting particular BG Color in one cell and duplicate it in anot

  • Thread starter Thread starter RidgeView
  • Start date Start date
R

RidgeView

Excel 2007....I have two worksheets where I need to detect a particular cell
background color in one of the worksheets and duplicate in another (not the
same formated sheet). I need to do this in a VBA Macro. I hope this is
enough information.....
 
Try

Different workbooks:
Workbooks("Workbook Name 2.xls").Worksheets("Sheet Name 2").Range("B2").Interior.ColorIndex = _
Workbooks("Workbook Name 1.xls").Worksheets("Sheet Name 1").Range("A1").Interior.ColorIndex

Different worksheets within the same workbook:
Worksheets("Sheet Name 2").Range("B2").Interior.ColorIndex = _
Worksheets("Sheet Name 1").Range("A1").Interior.ColorIndex

Note that this may not work if either cell has conditional formatting....

HTH,
Bernie
MS Excel MVP
 

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