For RowCnt = LBound(TgtAry, 1) to UBound(TgtAry, 1) For RowCtR = Ubound(TgTAry, 1) to RowCnt If TgtAry(RowCnt, UBound(TgtAry, 2)) > TgtAry(RowCtR, UBound(TgtAry, 2)) Then SavAry([略]) = TgtAry(RowCnt, [略]) TgtAry(RowCnt, [略]) = TgtAry(RowCtR, [略]) TgtAry(RowCtR,[略]) = SavAry([略]) [省略] End If Next Next