cjvdg
01-31-2021, 10:51 PM
I'm new to this VBA thing. I just want to ask if why does the selection of my header is in the wrong row? I mean, it should be in Row 8, right? But why does it shows in Row 2?
27831
The header should be in Row 8 because I have other stuff in Row 1 to Row 6.
For Each ws In Sheets(Array("G1-Q1", "G1-Q2"))
With ws.Cells(8, 3).CurrentRegion
.AutoFilter 2, StudID
.Offset(1).EntireRow.Delete
'ws.AutoFilterMode = False
End With
Next ws
The ws.Cells(8, 3) means that it is in Row 8 and Column C, right?
27831
The header should be in Row 8 because I have other stuff in Row 1 to Row 6.
For Each ws In Sheets(Array("G1-Q1", "G1-Q2"))
With ws.Cells(8, 3).CurrentRegion
.AutoFilter 2, StudID
.Offset(1).EntireRow.Delete
'ws.AutoFilterMode = False
End With
Next ws
The ws.Cells(8, 3) means that it is in Row 8 and Column C, right?