nyrangers1994
New Member
- Joined
- Aug 30, 2011
- Messages
- 17
I found a code to make a data validation dropdown list wider temporarily while the column is selected:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = "15" Then
Target.Columns.ColumnWidth = 20
Else
Columns(15).ColumnWidth = 8.43
End If
End Sub
The issue is that the cell I'm trying to expand is actually a merged cell between columns 15 and 16 (Columns O and P). How do I make it work when both columns are selected?
Thanks for your help.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = "15" Then
Target.Columns.ColumnWidth = 20
Else
Columns(15).ColumnWidth = 8.43
End If
End Sub
The issue is that the cell I'm trying to expand is actually a merged cell between columns 15 and 16 (Columns O and P). How do I make it work when both columns are selected?
Thanks for your help.