I have tried a couple of different codes to hide rows based on the results of a formula in one cell on that row.
One of them is this.
BeginRow = 58
EndRow = 500
ChkCol = 11
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value < 0.1 Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
The above causes a 30 second to 1 minute delay before final results are in.
And I have tried below based on another thread found in these forums, but the results are not accurate.
Range("K57:K5075").AutoFilter Field:=1, Criteria1:="<>"
Basically, in row K I have some cells with a formula that will add up to either a positive or negative number. I want to hide all rows that are 0. I have other rows I don't want to hide with no formula, so I simply typed in a "1" in those row's K cell.
The length of the page can change depending on the job it is used for. SO preferably, I would want something that started at row 58 and goes all the way to the end (again, the end can move, so I guess I would say the rest of the worksheet itself, as long as it does not add any delays).
Any help is greatly appreciated.
One of them is this.
BeginRow = 58
EndRow = 500
ChkCol = 11
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value < 0.1 Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
The above causes a 30 second to 1 minute delay before final results are in.
And I have tried below based on another thread found in these forums, but the results are not accurate.
Range("K57:K5075").AutoFilter Field:=1, Criteria1:="<>"
Basically, in row K I have some cells with a formula that will add up to either a positive or negative number. I want to hide all rows that are 0. I have other rows I don't want to hide with no formula, so I simply typed in a "1" in those row's K cell.
The length of the page can change depending on the job it is used for. SO preferably, I would want something that started at row 58 and goes all the way to the end (again, the end can move, so I guess I would say the rest of the worksheet itself, as long as it does not add any delays).
Any help is greatly appreciated.