0
0
Excelspreadsheet~10 mins

Chart elements (title, legend, axis labels) in Excel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a chart title in Excel VBA.

Excel
ActiveChart.HasTitle = True
ActiveChart.ChartTitle.Text = [1]
Drag options to blanks, or click blank then click option'
A"Sales Data"
BSales Data
CTitle
DChartTitle
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the quotes around the title text
Using a variable name instead of a string
2fill in blank
medium

Complete the code to show the legend on the chart.

Excel
ActiveChart.HasLegend = [1]
Drag options to blanks, or click blank then click option'
A1
BFalse
CShow
DTrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like "Show" instead of True
Using a number instead of Boolean
3fill in blank
hard

Fix the error in the code to set the X-axis label.

Excel
ActiveChart.Axes(xlCategory).HasTitle = True
ActiveChart.Axes(xlCategory).AxisTitle.Text = [1]
Drag options to blanks, or click blank then click option'
A"X Axis Label"
BX Axis Label
CAxisTitle
DCategory
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the label text
Using a variable name instead of a string
4fill in blank
hard

Fill both blanks to set the Y-axis label and show its title.

Excel
With ActiveChart.Axes([1])
  .HasTitle = [2]
  .AxisTitle.Text = "Revenue"
End With
Drag options to blanks, or click blank then click option'
AxlValue
BFalse
CTrue
DxlCategory
Attempts:
3 left
💡 Hint
Common Mistakes
Using xlCategory for Y-axis
Setting HasTitle to False
5fill in blank
hard

Fill all three blanks to add a chart title, show legend, and set X-axis label.

Excel
With ActiveChart
  .HasTitle = [1]
  .ChartTitle.Text = "Annual Sales"
  .HasLegend = [2]
  With .Axes([3])
    .HasTitle = True
    .AxisTitle.Text = "Month"
  End With
End With
Drag options to blanks, or click blank then click option'
ATrue
CxlCategory
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Setting HasTitle or HasLegend to False
Using xlValue instead of xlCategory for X-axis