[Solved] Compare Columns using VBA Macro
Try this Option Explicit Sub Demo() Dim ws As Worksheet Dim cel As Range Dim lastRowA As Long, lastRowB As Long Set ws = ThisWorkbook.Sheets(“Sheet2”) With ws lastRowA = .Cells(.Rows.Count, “A”).End(xlUp).Row ‘last row of column A lastRowB = .Cells(.Rows.Count, “B”).End(xlUp).Row ‘last row of column B For Each cel In .Range(“A1:A” & lastRowA) ‘loop through column … Read more