Hi all!
I have a limited knowledge of VBA and I'm learning by trial and error, but this time I'm really stuck.
I would like to hide columns based on 2 conditions.
example, conditions here are A1 and B1:
if A1 = 2022 and B1 = 2023, then we hide columns R to W
if A1 = 2023 and B1 = 2025, then we hide columns I to N and U to W
etc.
The macro would be triggered as soon as a value is entered in B1.
Could someone give a solution to my problem?
I have a limited knowledge of VBA and I'm learning by trial and error, but this time I'm really stuck.
I would like to hide columns based on 2 conditions.
example, conditions here are A1 and B1:
if A1 = 2022 and B1 = 2023, then we hide columns R to W
if A1 = 2023 and B1 = 2025, then we hide columns I to N and U to W
etc.
The macro would be triggered as soon as a value is entered in B1.
Could someone give a solution to my problem?