- VBScript code复制代码
Private Sub EachExcel() Dim i, j j = UsedRange.Rows.Count For i = 1 To UsedRange.Rows.Count '遍历所有行 If Cells(i, 1) = "abc" Then '获取 第i行 第1列 值 筛选 'Range(Cells(i, 1), Cells(i, 1)).EntireRow.Select '选中行 'Cells(i, 1) = "new value" '改变值 Range(Cells(i, 1), Cells(i, 1)).EntireRow.Hidden = True '隐藏行 End If Next End Sub