REferencing a cell from another sheet... and taking it's coplour with it?

P

Petitboeuf

Hello Experts!

Another question that I am incapable to resolve - oh and btw i dunno if
this is the right forum to post in!! :eek:

I have several sheets with data and cells that are manually colour
coded for their approval status.

Then I have a summary page that colates all the info with the folowing
formulas:
In cell A1: =IF(Sheet2!A1=0,"",Sheet2!A1)

Is there a way to colour the cell in the same way as the cell it links
from?

Many thanks
 
M

mrice

Try running the following short macro when the sheet containing the
formulae is activated

Sub Process()
Set CellRange = Cells.SpecialCells(xlCellTypeFormulas, 23)
For Each Cell In CellRange
Cell.Interior.ColorIndex = Sheets(Mid(Cell.Formula, 2,
InStr(Cell.Formula, "!") - 2)).Range(Right(Cell.Formula,
Len(Cell.Formula) - InStr(Cell.Formula, "!"))).Interior.ColorIndex
Next Cell
End Sub
 
Top