Hi all you nice people.
I have the following code which I 'stole' off a forum and changed parts to suit myself but it is not working correctly.
Sheet5.Activate
Dim cell As Range
For Each cell In ActiveSheet.Range("J1:J40000")
If (cell.Value = "") Then
cell.EntireRow.Hidden = False
End If
Next cell
For Each cell In ActiveSheet.Range("A1:A40000")
cell.EntireRow.Hidden = (cell.Value <> Me.cboNHI.Value)
End If
Next cell
I have a spreadsheet - Sheet5 - which copies 3 columns from a different sheet - Outcomes - and then I use Sheet5 to filter certain rows out by hiding them.
The above code is supposed to UNHIDE every row to start and then HIDE the rows which match my ComboBox.
It does actually work but it takes 15 minutes to chug through the first 40,000 rows to unhide them and another 15 minutes to hide the rows that don't meet my criteria.
I am useless at coding but am still pretty darn pleased with myself to even get this far...hehehehe
Can someone please help me out here so that it actually hides or unhides in a flash so to speak. The 40,000 is just a number because I have no idea how many rows each provider might enter so it can be the complete column if that's easier or better. Column J is in fact totally empty and was just my country boys way of trying to unhide all rows because I knew that that column had nothing in it.
Thanks a bunch
Turtle
Bookmarks