excelquestionusername
New Member
- Joined
- May 27, 2018
- Messages
- 1
I have a spreadsheet that tracks tasks with drop down boxes that include the values B, G ,Y, A, and N/A. The number of each status is calculated at the top of the sheet through a count if statement.
I am hoping to add in another drop down box above each section using the same as the above. So you can select N/A for a team. When selecting the N/A for the team I need a section of rows to also be set to N/A and hide the lines.
I am struggling to understand what I should be adding to set the cells to N/A - Please can someone help.
Private Sub Worksheet_Change(ByVal Target As Range)
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">If Range("G13") = "N/A" Then
</code>Set cells E14-E22 TO N/A and hide rows 14 - 22
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"> 'Range("14:22").EntireRow.Hidden = True'
Else
Range("14:22").EntireRow.Hidden = False
End If
</code>End Sub
I am hoping to add in another drop down box above each section using the same as the above. So you can select N/A for a team. When selecting the N/A for the team I need a section of rows to also be set to N/A and hide the lines.
I am struggling to understand what I should be adding to set the cells to N/A - Please can someone help.
Private Sub Worksheet_Change(ByVal Target As Range)
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">If Range("G13") = "N/A" Then
</code>Set cells E14-E22 TO N/A and hide rows 14 - 22
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"> 'Range("14:22").EntireRow.Hidden = True'
Else
Range("14:22").EntireRow.Hidden = False
End If
</code>End Sub