this sort of works... but it looks overly complex and I dont like the fact that I had to fix a range , using the xlup function messed it up...
as you can see every time a department is selected the formula has to unhide all rows then hide again based on the formula...
If ComboBox1.Value = "Company" Then
'Application.ScreenUpdating = False
Set rng = Range("B193", "B300")
For Each cel In rng
cel.EntireRow.Hidden = False
Next cel
For Each cel In rng
If Not cel.Value = "Company" Then
cel.EntireRow.Hidden = True
End If
Next cel
End If
If ComboBox1.Value = "Syndicate" Then
'Application.ScreenUpdating = False
Set rng = Range("B193", "B300")
For Each cel In rng
cel.EntireRow.Hidden = False
Next cel
For Each cel In rng
If Not cel.Value = "Syndicate" Then
cel.EntireRow.Hidden = True
End If
Next cel
End If
If ComboBox1.Value = "EU Corporate" Then
'Application.ScreenUpdating = False
Set rng = Range("B193", "B300")
For Each cel In rng
cel.EntireRow.Hidden = False
Next cel
For Each cel In rng
If Not cel.Value = "EU Corporate" Then
cel.EntireRow.Hidden = True
End If
Next cel
End If
If ComboBox1.Value = "ALL" Then
'Application.ScreenUpdating = False
Set rng = Range("B193", "B300")
For Each cel In rng
cel.EntireRow.Hidden = False
Next cel
End If
Bookmarks