|
Sub 隐藏pme()
Dim r&, i&
r = Cells(Rows.Count, 1).End(3).Row
Rows("2:" & r).EntireRow.Hidden = False
y = Cells(2, Columns.Count).End(xlToLeft).Column
lh = Replace(Cells(1, y).Address(0, 0), "1", "")
Columns("a:" & lh).EntireColumn.Hidden = False
For i = 2 To r Step 1
If Cells(i, 1) = "PME" Then
Rows(i).EntireRow.Hidden = True
End If
Next
For i = 2 To r Step 1
If Cells(2, i) = "PME" Then
Columns(i).EntireColumn.Hidden = True
End If
Next
End Sub
Sub 隐藏pmp()
Dim r&, i&
r = Cells(Rows.Count, 1).End(3).Row
y = Cells(2, Columns.Count).End(xlToLeft).Column
Rows("2:" & r).EntireRow.Hidden = False
y = Cells(2, Columns.Count).End(xlToLeft).Column
lh = Replace(Cells(1, y).Address(0, 0), "1", "")
Columns("a:" & lh).EntireColumn.Hidden = False
For i = 2 To r Step 1
If Cells(i, 1) = "PMP" Then
Rows(i).EntireRow.Hidden = True
End If
Next
For i = 2 To r Step 1
If Cells(2, i) = "PMP" Then
Columns(i).EntireColumn.Hidden = True
End If
Next
End Sub
|
|