Rows If cell.Row Mod 2 = 1 Then cell.Interior.ColorIndex = 36 End If Next cell End SubHighlight Blank Cells in SelectionThis basic macro highlights blank cells in a selection.' Highlight all Blank Cells in Selection Sub HighlightBlankCells() Dim rng As Range Set rng = Selection rng....
(Sheet1).Range(A1)Do While Not IsEmpty(currentCell) Set nextCell = currentCell.Offset(1, 0) If nextCell.Value = currentCell.Value Then currentCell.EntireRow.Delete End If Set currentCell = nextCellLoopEnd Sub Do迴圈具有很強的適應性,但使用時必須保證在循環體內有産生迴圈結束的程式碼,以避免...