Posted by: shijesh | January 31, 2010

Different way of adding comment – Cool and Elegant

  • Select the cell in which you want to add comment
  • Choose Data –> Validation
  • Click on the Input Message tab to activate it
  • Add a check mark to ‘Show input message when cell is selected’
  • Type your message heading text in the Title box. This text will appear in bold print at the top of the message.(this is generally not necessary)
  • Type your message in the Input message box.
  • Click OK
Posted by: shijesh | January 31, 2010

Adding Labels to XY Scattered Chart in MS Excel

Few days back on of my colleague wanted to know how to add label to XY-Scattered Chart in MS Excel.

Well here is the VB Code for the same.

Sub label_xy_chart()
    Dim xchart As Chart
    Dim label_row As Integer
    Dim no_of_points As Integer

    'selets the chart for adding label
    Set xchart = ActiveChart

    On Error Resume Next

    xchart.SeriesCollection(1).ApplyDataLabels Type:=xlDataLabelsShowValue

    '# of point in the chart
    no_of_points = xchart.SeriesCollection(1).Points.Count

    'address of first cell containing the label
    Set xrange = Application.InputBox("Select 1st cell containing label", Type:=8)

    'looping through each lable and adding to the chart
    For label_row = xrange.Row To no_of_points
    xchart.SeriesCollection(1).Points(label_row).DataLabel.Text = _
    ActiveSheet.Cells(label_row, xrange.Column).Value
    Next label_row
End Sub

To use this first create your XY Scattered Chart. Then Run the above vb code.

A input window will come… Select the first cell of the column which contain the label .. click OK.

Posted by: shijesh | January 27, 2010

Hello world!

Welcome to This is your first post. Edit or delete it and start blogging!

« Newer Posts