[Solved] Rearranging Excel Cell based on Value [closed]
This sub procedure works with two variant arrays. Option Explicit Sub Macro3() Dim i As Long, j As Long, nr As Long Dim tmp As Variant, arr As Variant, hdr As Variant, vals As Variant With Worksheets(“sheet4”) tmp = .Cells(1, “A”).CurrentRegion ReDim vals(LBound(tmp, 1) To UBound(tmp, 1), LBound(tmp, 2) To UBound(tmp, 2)) nr = UBound(tmp, … Read more