Right now we have specific code to hide certain rows. It checks if in three different ranges if there is no value in a row and hides this row. This works very good.
However we now need to hide the rows when the value in column 5 of a row is equal to "0,00". The ranges where we need to check this do not have to be changed.
I already tried a lot of different methods, but can't get it working.
The current code is:
![]()
Sub HideEmptyRows() rnANVAjaar.Select rnANVAjaar.Unprotect Dim R1, R2, R3, AR, C As Range Set R1 = Range("A5:A24") Set R2 = Range("A33:A37") Set R3 = Range("A46:A50") Set AR = Union(R1, R2, R3) Application.DisplayAlerts = False Application.ScreenUpdating = False Application.Calculation = xlCalculationManual For Each C In AR If Len(C.Text) = 0 Then C.EntireRow.Hidden = True Else C.EntireRow.Hidden = False End If Next C rnANVAjaar.Protect Application.DisplayAlerts = True Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub
Can somebody help me out.
Thanks in advance.
Berend-Jan











LinkBack URL
About LinkBacks
Register To Reply

Bookmarks