YlvaElise
For example, you can try this code 🙂
Sub Hide_Unhide_Columns()
Dim ws As Worksheet
Dim rng As Range
Dim cell As Range
Set ws = ThisWorkbook.Sheets("Sheet1") 'Change sheet name as needed
Set rng = ws.Range("A1:G1") 'Change range as needed For Each cell In rng
If cell.Value = "Intern" Then 'Change value as needed cell
.EntireColumn.Hidden = False 'Show column Else
If cell.Value = "Extern" Then 'Change value as needed cell
.EntireColumn.Hidden = False 'Show column Else cell
.EntireColumn.Hidden = True 'Hide column
End If
Next cell
End Sub
You need to customize the code to suit your needs and associate it with a button click or worksheet switch event.
I hope this helps you.