how would I Remove the fill color of every fourth row starting after the 4th row. thanks
D daphoenix Jun 25, 2008 #1 how would I Remove the fill color of every fourth row starting after the 4th row. thanks
D Don Guillett Jun 25, 2008 #2 Try this. If you want row 4 also just change 8 to 4 Sub removecolorfromcellsinrow() mc = "m" For i = 8 To Cells(Rows.Count, mc).End(xlUp).Row Step 4 'MsgBox i Cells(i, mc).Interior.ColorIndex = 0 Next i End Sub
Try this. If you want row 4 also just change 8 to 4 Sub removecolorfromcellsinrow() mc = "m" For i = 8 To Cells(Rows.Count, mc).End(xlUp).Row Step 4 'MsgBox i Cells(i, mc).Interior.ColorIndex = 0 Next i End Sub
D daphoenix Jun 26, 2008 #3 Thanks for the help again don, the code that you gave me only changes the color in column M, how would I apply this to the entire row.
Thanks for the help again don, the code that you gave me only changes the color in column M, how would I apply this to the entire row.
D Don Guillett Jun 26, 2008 #4 Cells(i, mc).Interior.ColorIndex = 0 to Cells(i, mc).ENTIREROW.Interior.ColorIndex = 0
D daphoenix Jun 26, 2008 #5 it works great thanks...but when running this the last row of the workbook is still left filled in, is there a way to change this?
it works great thanks...but when running this the last row of the workbook is still left filled in, is there a way to change this?
D Don Guillett Jun 26, 2008 #6 Must not be a multiple of 4. you could add the line just before end sub rows(Cells(Rows.Count, mc).End(xlUp).Row ).Interior.ColorIndex = 0
Must not be a multiple of 4. you could add the line just before end sub rows(Cells(Rows.Count, mc).End(xlUp).Row ).Interior.ColorIndex = 0