View Single Post
 
Old 06-11-2019, 09:56 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

You didn't answer the questions in post 16.

Anyway, try this.
Written cells are colored for visual identification.
Code:
Sub CombineData_v4()
    Dim i As Long, j As Long, lr As Long, helpCol As Long
Application.ScreenUpdating = False
With Sheets("Vendor Report")
    lr = .Range("S" & Rows.Count).End(xlUp).Row
    helpCol = 30    'AD
    For i = lr To 3 Step -1
        If .Cells(i, helpCol) = "A" And .Cells(i, "S") = .Cells(i - 1, "S") Then
            For j = 17 To 6 Step -1
                If .Cells(i, j) <> 0 Then
                    .Cells(i - 1, j) = .Cells(i, j)
                    .Cells(i - 1, j).Interior.ColorIndex = 17
                End If
            Next j
            .Rows(i).Delete
        End If
    Next i
End With
Application.ScreenUpdating = True
End Sub
Reply With Quote