Hi, the first IF works very well thanks to the contributors/helpers on this board.
Question though, id like to delete a row if certain cells contain a certain color (RGB120,20,50). However not working well for me, any suggestions please?
For i = LastRow To 2 Step -1
If Cells(i, 2).Value > 0 Then
Range(Cells(i, 8), Cells(i, 12)).Offset(3).FormulaR1C1 = "=CONCATENATE(R[-2]C,"" "",LEFT(R[-1]C,1),""."")"
Range(Cells(i + 1, 8), Cells(i + 1, 12)).Value = Range(Cells(i + 3, 8), Cells(i + 3, 12)).Value
Range(Cells(i, 8), Cells(i, 12)).Offset(2).EntireRow.Delete
Range(Cells(i, 8), Cells(i, 12)).Offset(2).EntireRow.Delete
Range(Cells(i, 1), Cells(i, 7)).Cut Range(Cells(i + 1, 1), Cells(i + 1, 7))
If Range(Cells(i - 1, 1), Cells(i - 1, 6)).Interior.Color = RGB(150, 20, 50) Then
Range(Cells(i - 1, 1),Cells(I - 1, 6 ).offset(-1).EntireRow.Delete
End If
End If
Next i
Question though, id like to delete a row if certain cells contain a certain color (RGB120,20,50). However not working well for me, any suggestions please?
For i = LastRow To 2 Step -1
If Cells(i, 2).Value > 0 Then
Range(Cells(i, 8), Cells(i, 12)).Offset(3).FormulaR1C1 = "=CONCATENATE(R[-2]C,"" "",LEFT(R[-1]C,1),""."")"
Range(Cells(i + 1, 8), Cells(i + 1, 12)).Value = Range(Cells(i + 3, 8), Cells(i + 3, 12)).Value
Range(Cells(i, 8), Cells(i, 12)).Offset(2).EntireRow.Delete
Range(Cells(i, 8), Cells(i, 12)).Offset(2).EntireRow.Delete
Range(Cells(i, 1), Cells(i, 7)).Cut Range(Cells(i + 1, 1), Cells(i + 1, 7))
If Range(Cells(i - 1, 1), Cells(i - 1, 6)).Interior.Color = RGB(150, 20, 50) Then
Range(Cells(i - 1, 1),Cells(I - 1, 6 ).offset(-1).EntireRow.Delete
End If
End If
Next i