2014-05-08 67 views
2

我在excel電子表格中有4000列和200行,我想製作一個包含所有數據的折線圖,但是一旦我創建圖表,就很難看到即使我將頁面縮放到最大值,圖表中的每個單獨項目也是如此。如何在excel中製作可縮放的圖表2013

enter image description here

有沒有更好的主意,以包含大量的數據圖表,還能夠放大才能看到各個項目?

回答

4

您可以添加第二個圖表使用像變焦:

enter image description here

隨着滾動條的ActiveX可以滾動(變焦)大圖減少數據的範圍:

Private Sub ScrollBar1_Change() 
    Dim xx As Integer 
    xx = ScrollBar1.Value 
    ActiveSheet.ChartObjects("Chart 2").Activate 
    ActiveChart.PlotArea.Select 
    ActiveChart.SetSourceData Source:=Range("B" & xx & ":C" & xx + 3) 
End Sub 

如果你想要,你可以有垂直值固定或變量。我添加了一個組合來選擇:

Private Sub ComboBox1_Change() 
    Dim Fixed As Single 

    If ComboBox1.Value = "Fix" Then 
     ActiveSheet.ChartObjects("Chart 1").Activate 
     ActiveChart.PlotArea.Select 
     Fixed = ActiveChart.Axes(xlValue).MaximumScale 
     ActiveSheet.ChartObjects("Chart 2").Activate 
     ActiveChart.PlotArea.Select 
     ActiveChart.Axes(xlValue).MaximumScale = Fixed 
    Else 
     ActiveSheet.ChartObjects("Chart 2").Activate 
     ActiveChart.PlotArea.Select 
     ActiveChart.Axes(xlValue).MaximumScaleIsAuto = True 
    End If 
End Sub 
相關問題