excelvba如何刪除兩個(gè)表重復(fù)行?
2、然后在彈出來(lái)的窗口中點(diǎn)擊輸入:Sub 刪除重復(fù)行()Dim xRow As IntegerDim i As IntegerxRow = Range("B65536").End(xlUp).RowFor i = 2 To xRowFor j = i + 1 To xRowIf Cells(j, 2) = Cells(i, 2) ThenRange(Cells(j, 1), Cells(j, 256)).Rows.Deletej = j - 1xRow = xRow - 1End IfNextNextEnd Sub3、然后點(diǎn)擊左上角的保存按鈕進(jìn)行保存,之后運(yùn)行該代碼或運(yùn)行宏“刪除重復(fù)行”即可。
4、然后就可以刪除重復(fù)數(shù)據(jù)的整行。