Friday, December 10, 2010

A revised updated project

An updated version (of problem 2) is on the I-drive folder. It is the same that was handed out in class on Friday the 10th.

Check the comments to this post for some comments from Nathan for plotting the data for the Philips curve. (He'll get to it at some point.) (Thanks Nathan)

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. First, here is the information you need to get off of the Microsoft website:

    Sub AttachLabelsToPoints()

    'Dimension variables.
    Dim Counter As Integer, ChartName As String, xVals As String

    ' Disable screen updating while the subroutine is run.
    Application.ScreenUpdating = False

    'Store the formula for the first series in "xVals".
    xVals = ActiveChart.SeriesCollection(1).Formula

    'Extract the range for the data from xVals.
    xVals = Mid(xVals, InStr(InStr(xVals, ","), xVals, _
    Mid(Left(xVals, InStr(xVals, "!") - 1), 9)))
    xVals = Left(xVals, InStr(InStr(xVals, "!"), xVals, ",") - 1)
    Do While Left(xVals, 1) = ","
    xVals = Mid(xVals, 2)
    Loop

    'Attach a label to each data point in the chart.
    For Counter = 1 To Range(xVals).Cells.Count
    ActiveChart.SeriesCollection(1).Points(Counter).HasDataLabel = _
    True
    ActiveChart.SeriesCollection(1).Points(Counter).DataLabel.Text = _
    Range(xVals).Cells(Counter, 1).Offset(0, -1).Value
    Next Counter

    End Sub

    copy that for use later.
    http://support.microsoft.com/kb/213750 <= there is the link if needed

    Here are the steps:
    1. Copy the module sheet from the Microsoft website. (above)
    2. Create the scatter plot (make sure only numbers are selected)
    2. click on office button (upper left-hand corner) and select excel options (towards bottom right) check show "developer tab in ribbon"
    3. click on developer tab and select visual basic (vb editor will open)
    4. select insert and select module. This will open blank space. Paste script in, then close (x in uppermost right-hand corner)
    5. click on Macros and click run

    Like I said in class, this must be done in 2007 version of Excel. Also, this graph cannot be saved in Excel. Simply copy it and paste it in Word to save the graph. If you have any questions, feel free to email me at dwzn@iup.edu

    ReplyDelete
  3. Big Bad Oops.

    I think I failed to save the "revised" version of the project. If anyone needs a copy you should stop by the office and pick one up.

    ReplyDelete