I have a report that lists information about different phases of several projects. When others make changes to the sheet, they change the font color of those changes to red. Then after our weekly meeting I go through and change all the red text to black or white (depending on the background color of the cell).
I would like to have a macro that will do this for me as it is very time consuming.
So I'm looking for code that will do the following:
for the cells in columns N,M,Q,R and T,
if the background color is RGB(208, 192, 98), then fontcolor is Black
if the background color is RGB(255, 0, 0), then fontcolor is white,
etc.
I tried to patch together some code (as follows) but it wasn't working.
Sub OldChanges()
Dim Row As Integer
Dim Back As Boolean
For Row = 5 To 200
Back = ActiveSheet.Cells(Row, N).Interior.Color
If Back = RGB(208, 192, 98) Then
ActiveSheet.Cells(Row, N).Font.ColorIndex = 1
Else
ActiveSheet.Cells(Row, N).Font.ColorIndex = 2
End If
Next Row
End Sub
Thanks for your help!
JJH
Bookmarks