Try this amended code:
Sub Skjul_0_Projektaftale()
Dim rowNum As Long, beginRow As Long, endRow As Long
Dim CheckCol_1 As Long, CheckCol_2 As Long, CheckCol_3 As Long
beginRow = 150 'first row'
endRow = 180 'last row'
CheckCol_1 = 4 'column number --> Gulvarme
CheckCol_2 = 10 'First column
CheckCol_3 = 16 'Second column
For rowNum = beginRow To endRow
If Cells(rowNum, CheckCol_1).Value <> "" Then
Rows(rowNum).Resize(3).Hidden = True 'hide all 3 rows first
If Cells(rowNum, CheckCol_2).Value <> "" Or Cells(rowNum, CheckCol_3).Value <> "" Then Rows(rowNum).Hidden = False 'first row has values, unhide
If Cells(rowNum + 1, CheckCol_2).Value <> "" Or Cells(rowNum + 1, CheckCol_3).Value <> "" Then
Rows(rowNum).Resize(2).Hidden = False 'second row has values, unhide first and second rows
End If
If Cells(rowNum + 2, CheckCol_2).Value <> "" Or Cells(rowNum + 2, CheckCol_3).Value <> "" Then
Rows(rowNum).Hidden = False 'third row has values, unhide first and third rows
Rows(rowNum + 2).Hidden = False
End If
End If
Next rowNum
End Sub
Bookmarks