Forum Discussion

agwalsh's avatar
agwalsh
Brass Contributor
Sep 22, 2025
Solved

Legend setting in Excel charts - possible to set default to go to top of chart

hello

I hope you are well. When I add a legend to a chart in Excel, it invariably defaults to the bottom or side, rather than the top. Is there a way to change this default behaviour? 

Thank you

  • Try this if you are comfortable with VBA:

    Sub SetLegendTop()
        Dim ch As Chart
        For Each ch In ActiveSheet.ChartObjects
            ch.Chart.Legend.Position = xlLegendPositionTop
        Next ch
    End Sub

     

     

     

2 Replies

  • agwalsh's avatar
    agwalsh
    Brass Contributor

    So I think the answer is No, unless you use VBA :-) Thank you for your help. Much appreciated. 

  • Try this if you are comfortable with VBA:

    Sub SetLegendTop()
        Dim ch As Chart
        For Each ch In ActiveSheet.ChartObjects
            ch.Chart.Legend.Position = xlLegendPositionTop
        Next ch
    End Sub

     

     

     

Resources