I'm trying to loop through two separate sheets going row by row starting at row 2 comparing multiple columns (Product Number, Date, Quantity) in Excel using VBA.My nested loops are taking way too long. Is there another way to loop through, while cutting down on time, but being able to compare multiple columns at the same time?For i = 2 To lastRow22    If ws2.Cells(i, 80) = 1 Or ws2.Cells(i, 80) = 2 Then            x = ws2.Cells(i, 79)        ElseIf ws2.Cells(i, 80) = 0 Then            x = ws2.Cells(i, 1)        End If    x2 = Trim(ws2.Cells(i, 81))    xDate = Trim(ws2.Cells(i, 19))    xQD = Trim(ws2.Cells(i, 20))    For j = 2 To lastRow33        y = Trim(ws3.Cells(j, 28))        y2 = Trim(ws3.Cells(j, 10))        yDate = Trim(ws3.Cells(j, 13))        yQD = Trim(ws3.Cells(j, 17))        If x = y And xDate = yDate And xQD = yQD And ws2.Cells(i, 82) = 0 And ws3.Cells(j, 27) = 0 Then            ws3.Cells(j, 1).Interior.Color = vbGreen            ws2.Cells(i, 1).Interior.Color = vbGreen            ws2.Cells(i, 82) = 1            ws3.Cells(j, 27) = 1        ElseIf x2 = y2 And xDate = yDate And xQD = yQD And ws2.Cells(i, 82) = 0 And ws3.Cells(j, 27) = 0 Then            ws3.Cells(j, 1).Interior.Color = vbGreen            ws2.Cells(i, 1).Interior.Color = vbGreen            ws2.Cells(i, 82) = 1            ws3.Cells(j, 27) = 1        End If    Next jNext i
Nested Loop For Cell Compare
vba;excel