Hotkey to open filter drop down menu in merged cell in Excel 2010

0

0

I use Excel 2010 and use Alt+Down arrow to open filter drop down menus.

Sometimes my header contains vertically merged cells (e.g. autofilters are in the second row and in some columns cells in rows 1 and 2 are merged) and in this case pressing Alt+Down doesn't open the menu, probably because upper cell is "selected" according to excel, but filter is in the second row.

Does a hotkey exist for this? Or is it possible to open the menu using VBA?

Máté Juhász

Posted 2015-04-14T09:33:20.637

Reputation: 16 807

Try this workaround.

– harrymc – 2015-04-21T20:02:33.343

Thanks for the suggestion. Unfortunately that doesn't help. I've the header merged, causing hotkey to open menu not working, in the example they discuss merged cells in the data range. – Máté Juhász – 2015-04-21T20:17:37.813

Answers

1

I don't think there's any solution so long as the header is merged. I propose a workaround: Un-merge the header cells, format things so it still appears the same although it's now two cells, and use VBA so the user can't select the first row.

For instance, if the cells A1:A2 were the header, the VBA to ensure that A1 can't be the active cell could be this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("A1")) Is Nothing Then
        If ActiveCell.Address = Range("A1").Address Then
            If Target.Cells.Count = 1 Then
                Range("A2").Select
            Else
                Union(Target, Range("A2")).Select
                Range("A2").Activate
            End If
        End If
    End If
End Sub

Note that this code could stand to be optimized a bit more. For instance, if you select all of Row 1, then this code selects all of Rows 1 & 2. However, this should be enough for you to figure out if the idea will work.

Engineer Toast

Posted 2015-04-14T09:33:20.637

Reputation: 3 019

Thanks for the suggestion. The reasons why cells are merged are: Text wrapping: some captions are long; and I need to filter tables several times and copy the result to Word, so I'm afraid I need the cells really merged to have them well formatted in Word to. Although thank you very much for your effort, the idea is good! – Máté Juhász – 2015-04-28T03:56:29.620

With your data setup, would it be feasible to increase the header row height? It would make all headers taller but the ones with long captions would still fit in a single cell. – Engineer Toast – 2015-04-28T12:35:07.833

I need then merged in Word and opening menu by mouse click is still quicker than merging cells in Word. – Máté Juhász – 2015-04-28T17:43:53.240