Consulting

Results 1 to 5 of 5

Thread: "For Loop" to Change "Chart title" based on sequential cells

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    "For Loop" to Change "Chart title" based on sequential cells

    Dear all,

    What a great forum, thank you for taking the time to help this simple problem.

    I have create 'Radar Charts' to represent individual student attainment and I wish the chart title to reflect the students name.

    I have managed to find the syntax to do this for the first instance, but cannot figure out the loop code to make it do it to all available charts (this will be a variable due to class sizes) and to move to the next cell (next student name): (Please forgive poor naming of macro)



    Sub Macro5()
    ActiveSheet.ChartObjects("Chart 1").Activate
           With ActiveSheet.ChartObjects(1).Chart
        .HasTitle = True
        .ChartTitle.Text = "=Radar!A2"
    End With
    
    End Sub

    I have uploaded the file with 2 sheets:

    1. Radar
    2. Yr 7 Data

    Sheet 2 'Yr 7 Data', will have the class register where I wish the Charts Titles will obtain their new Titles, based off of the correlating student.
    Attached Files Attached Files

Posting Permissions

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