Consulting

Results 1 to 2 of 2

Thread: VBA PLOT JUMP ROW

  1. #1

    VBA PLOT JUMP ROW

    Hello everyone,

    First of all I would like to apologize of not posting a sample code that you can comment on, but i think it would be trivial.

    Now, I would like to create a macro to plot a series where whenever it encounters a empty cell it put a gap in the plot.

    Cheers for the help

  2. #2
    The following code should do it, but it only work when some of the cells are blank (empty). at the moment they come from a function which displys a number if a condition is satisfied, if not it puts "".

    "" is not blank (empty) how can i make the cell blank?

    [vba]Sub plot_gaps_2003()
    '
    ' plot_gaps_2003 Macro
    ' Macro recorded 18/08/2010 by fgeraci
    '
    '
    Charts.Add
    ActiveChart.ChartType = xlXYScatterLines
    ' ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(1).XValues = "=BSC!R10C1:R43C1"
    ActiveChart.SeriesCollection(1).Values = "=BSC!R10C7:R43C7"
    ActiveChart.DisplayBlanksAs = xlNotPlotted
    ActiveChart.Location Where:=xlLocationAsObject, Name:="BSC"
    With ActiveChart
    .HasTitle = True
    .ChartTitle.Characters.Text = "sada"
    .Axes(xlCategory, xlPrimary).HasTitle = True
    .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "fdghfd"
    .Axes(xlValue, xlPrimary).HasTitle = True
    .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "rttyrty"
    End With
    End Sub[/vba]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •