Hi All,
I don't have much knowledge in VBA and in urgent need of help with a code to perform the following:
As shown below, I have a worksheet with a list of 6 criteria in A1:A6, with a data validation list in B1:B6 of "Yes" and "No" values.
In the worksheet I want columns C:N to be always hidden until I start selecting "Yes" from the data validation list in column B (see below). I allocated the following columns to each criteria:
Low = columns CD
Medium = columns EF
High = columns GH
Strong = columns IJ
Weak = columns KL
Other = columns MN
Based on my selection I want to only unhide the relevant columns for each criteira with a "Yes" value.
If I select Yes in criteria A1 (Low) and A3 (High) (please see Example 1 below), it will only unhide columns C:D and G:H.
Is it possible to make this dynamic, if I then change my selection it will then hide columns C:N and unhide the columns based on my new criteria selections with a "Yes" value in criteria A2 (Medium) and A5 (Weak) (please see Example 2 below), only unhiding columns E:F and K:L
I hope this makes sense. Any help on this problem would be much appreciated.
SONART
Example 1
<TBODY>
</TBODY>
Example 2
<TBODY>
</TBODY>
I don't have much knowledge in VBA and in urgent need of help with a code to perform the following:
As shown below, I have a worksheet with a list of 6 criteria in A1:A6, with a data validation list in B1:B6 of "Yes" and "No" values.
In the worksheet I want columns C:N to be always hidden until I start selecting "Yes" from the data validation list in column B (see below). I allocated the following columns to each criteria:
Low = columns CD
Medium = columns EF
High = columns GH
Strong = columns IJ
Weak = columns KL
Other = columns MN
Based on my selection I want to only unhide the relevant columns for each criteira with a "Yes" value.
If I select Yes in criteria A1 (Low) and A3 (High) (please see Example 1 below), it will only unhide columns C:D and G:H.
Is it possible to make this dynamic, if I then change my selection it will then hide columns C:N and unhide the columns based on my new criteria selections with a "Yes" value in criteria A2 (Medium) and A5 (Weak) (please see Example 2 below), only unhiding columns E:F and K:L
I hope this makes sense. Any help on this problem would be much appreciated.
SONART
Example 1
A | B | C | D | E | F | G | H | I | J | K | L | M | N | ||
1 | Low | Yes | |||||||||||||
2 | Medium | No | |||||||||||||
3 | High | Yes | |||||||||||||
4 | Strong | No | |||||||||||||
5 | Weak | No | |||||||||||||
6 | Other | No | |||||||||||||
<TBODY>
</TBODY>
Example 2
A | B | C | D | E | F | G | H | I | J | K | L | M | N | ||
1 | Low | No | |||||||||||||
2 | Medium | Yes | |||||||||||||
3 | High | No | |||||||||||||
4 | Strong | No | |||||||||||||
5 | Weak | Yes | |||||||||||||
6 | Other | No | |||||||||||||
<TBODY>
</TBODY>