Can someone explain why the second If (Nested) is causing a mismatch 13 error, and how to fix ?
Thank You
jamada
Dim LastRow As Long
Dim i As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
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, 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, 8), Cells(i + 1, 12)).Value = Range(Cells(i + 1, 8), Cells(i + 1, 12)).Value Then
Range(Cells(i + 1, 8), Cells(i + 1, 12)).Interior.Color = RGB(146, 208, 80)
End If
End If
Thank You
jamada
Dim LastRow As Long
Dim i As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
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, 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, 8), Cells(i + 1, 12)).Value = Range(Cells(i + 1, 8), Cells(i + 1, 12)).Value Then
Range(Cells(i + 1, 8), Cells(i + 1, 12)).Interior.Color = RGB(146, 208, 80)
End If
End If