Hirdetés

Új hozzászólás Aktív témák

  • Fehér Mancs

    tag

    válasz bagyulajuve #4217 üzenetére

    Ezt a formázást csak makróval lehet megoldani. Először 3 oszlopba fel kell vinni az adatokat, majd készíteni rá egy egyszerű oszlopos diagrammot, és utána a lenti makró megformázza azt.

    Sub Macro8()
    ' 2. adatsor
    With ActiveChart.SeriesCollection(2)
    .ChartType = xlLineMarkers
    .AxisGroup = 2
    .MarkerForegroundColorIndex = 3
    .MarkerStyle = xlDash
    .MarkerSize = 10
    .Border.LineStyle = xlNone
    End With

    ' 3. adatsor
    With ActiveChart.SeriesCollection(3)
    .ChartType = xlLineMarkers
    .AxisGroup = 2
    .MarkerForegroundColorIndex = 3
    .MarkerStyle = xlDash
    .MarkerSize = 10
    .Border.LineStyle = xlNone
    End With

    ' Dropdown lines
    With ActiveChart.ChartGroups(2)
    .HasDropLines = False
    .HasHiLoLines = True
    .HasUpDownBars = False
    End With

    ' Minimum és maximum tengelyértékek megadása
    If ActiveChart.Axes(xlValue).MinimumScale < ActiveChart.Axes(xlValue, xlSecondary).MinimumScale Then
    ActiveChart.Axes(xlValue, xlSecondary).MinimumScale = ActiveChart.Axes(xlValue).MinimumScale
    Else
    ActiveChart.Axes(xlValue).MinimumScale = ActiveChart.Axes(xlValue, xlSecondary).MinimumScale
    End If
    If ActiveChart.Axes(xlValue).MaximumScale > ActiveChart.Axes(xlValue, xlSecondary).MaximumScale Then
    ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = ActiveChart.Axes(xlValue).MaximumScale
    Else
    ActiveChart.Axes(xlValue).MaximumScale = ActiveChart.Axes(xlValue, xlSecondary).MaximumScale
    End If

    End Sub

    [ Szerkesztve ]

Új hozzászólás Aktív témák