+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 15 of 54
  1. #1
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Connect data markers

    Hi all:

    The attached document has a graph that joins all four points of a data marker properly, till the 10th iteration is encounter. At this point, two data markers do not connect. Any suggestions? Thanks.

    - Ravi
    Attached Files Attached Files
    Last edited by ravichander; 02-12-2009 at 12:09 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Unable to connect data markers

    Because the formula in this 2 cells is incorrect.

    BoxesScreen7 $U$6 and $S$6
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Thank you for your response. Yes, that fixed it. However, why are Series Point 13 and 14 in bold? Thanks.

    - Ravi

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Unable to connect data markers

    When you say bold do you mean the lines are slightly thicker?

    If so this is just a result of the way the chart is drawn. Try changing the size of the chart and you will see the thicker lines may well change to other series.

    To avoid this you could just plot a single line rather than 2 between each set of points. More difficult to determine which values to use but the thicker lines will go.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Yes, I meant that some lines were thicker. Would an If statement to check whether a line has already been plotted be the way to resolve this? Thanks.

    - Ravi

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Unable to connect data markers

    Yes. Only output data for 1 vertical. You just need to determine what values to use. You may still need 2 sets of values but try and avoid laying the lines over each other.

    You may be better off using Error bars.
    Cheers
    Andy
    www.andypope.info

  7. #7
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Change the Chart Type to Error bars? Thanks.

    - Ravi

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Unable to connect data markers

    Not change the chart type. xy-scatter is what you need.

    Instead of joining the points with the normal line use x and y error bars with custom values.
    A similar approach is used to create a step chart
    http://www.andypope.info/charts/stepchart.htm
    Cheers
    Andy
    www.andypope.info

  9. #9
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy: Thank you for the link on the XY Scatter with Error Bars. I honestly do not know how to approach this. Further the points have to be joined to form a box and not just steps as in your illustration. Can you get me started on this? Thanks.

    - Ravi

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Unable to connect data markers

    You take the principle of the step chart and extend it to make boxes.

    See attached.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  11. #11
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Andy:

    Thank you. I will work on it. Appreciate the help.

    - Ravi

  12. #12
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Here is what I thought of doing.

    The following VBA code checks to see if the first cell has any data. If there is data, then it will call a macro that will process the first line of the example that you gave me.

    Code:
    Sub DeterminNumberOfBoxesScreen7()
        Sheets("Pay Grades").Select
        Range("D20").Select
        If ActiveCell.Value <> "" Then
            Call PayGradeBoxesScreen7
        Else
            Sheets("Pay Grades").Select
            Range("F1").Select
        End If
    End Sub
    This code processes the first line of your example.

    Code:
    Sub PayGradeBoxesScreen7()
    '
    ' PayGradeBoxesScreen7 Macro
    '
    
    '
        ActiveWindow.ScrollRow = 1
        Range("F1").Select
        Sheets("BoxesScreen7").Select
        Range("G20").Select
        ActiveCell.FormulaR1C1 = "='Pay Grades'!R[-3]C[-4]"
        Range("G21").Select
        ActiveCell.FormulaR1C1 = "="
        Range("G21").Select
        ActiveCell.FormulaR1C1 = "='Pay Grades'!R[-1]C[-5]"
        Range("H21").Select
        ActiveCell.FormulaR1C1 = "='Pay Grades'!R[-1]C[-2]"
        Range("I21").Select
        ActiveCell.FormulaR1C1 = "='Pay Grades'!R[-1]C[-2]"
        Range("J21").Select
        ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]"
        Range("K21").Select
        ActiveCell.FormulaR1C1 = "=BoxesScreen7!R[-1]C[-4]-BoxesScreen7!RC[-4]"
        Sheets("Pay Grades").Select
        Range("F1").Select
    End Sub
    How would I write code to select D21 and check for the existence of any data, and then if there is, increment macro PayGradeBoxesScreen7 to process the next line?

    Thanks.

    - Ravi

  13. #13
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    A minor correction. The Range to be slected in the first part of the code is B20 and not D20. Thanks.

    - Ravi

  14. #14
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Unable to connect data markers

    What exactly are you trying to do?
    Cheers
    Andy
    www.andypope.info

  15. #15
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    I am trying to automate the process of populating data just like you had in your example to then generate the graph. Thanks.

    - Ravi

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0