[RESOLVED] Loop Tuning EXCEL
Hi,
What I want to do is to hide all row that are NOT bold or empty.
My range starts at row 12 and I don't know at witch row it finishes. I know that it finishes with the text GRAND TOTAL in column A and there is approx. 600 rows. I want this job to be performed when the button is clicked
So here is what I've done
VB Code:
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
ActiveSheet.Range("A12").Activate
Do While (ActiveCell.Value <> "GRAND TOTAL")
If (ActiveCell.Font.Bold = False Or ActiveCell.Value = "") Then
ActiveCell.EntireRow.Hidden = True
End If
ActiveCell.Offset(1, 0).Activate
Loop
Application.ScreenUpdating = True
End Sub
This loop does all I want, but it takes 45 to 60 sec to accomplish. That is way too long.
Any idea?
Re: [RESOLVED] Loop Tuning EXCEL
it really only worked because I posted here....http://noteme.com/vb_extension/smilies/coolgleamA.gif
(oh the joys of MS...)