0
0
Excelspreadsheet~10 mins

Treemap and sunburst 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 insert a treemap chart from data in Excel.

Excel
ActiveSheet.Shapes.AddChart2(251, [1], 100, 100, 400, 300).Select
Drag options to blanks, or click blank then click option'
AxlTreemap
BxlPie
CxlLine
DxlBarClustered
Attempts:
3 left
💡 Hint
Common Mistakes
Using a chart type like xlPie or xlLine instead of xlTreemap.
Not specifying the chart type correctly.
2fill in blank
medium

Complete the code to insert a sunburst chart from data in Excel.

Excel
ActiveSheet.Shapes.AddChart2(251, [1], 50, 50, 500, 350).Select
Drag options to blanks, or click blank then click option'
AxlScatter
BxlColumnClustered
CxlAreaStacked
DxlSunburst
Attempts:
3 left
💡 Hint
Common Mistakes
Using a chart type like xlColumnClustered or xlScatter instead of xlSunburst.
Incorrect chart type constant causes errors.
3fill in blank
hard

Fix the error in the VBA code to set the chart title for a treemap chart.

Excel
With ActiveChart
  .ChartTitle.Text = [1]
End With
Drag options to blanks, or click blank then click option'
ATrue
B"Sales Data"
CSales Data
D12345
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the title text.
Using a number or boolean instead of a string.
4fill in blank
hard

Fill both blanks to set the chart type and add data source for a sunburst chart.

Excel
With ActiveSheet.Shapes.AddChart2(251, [1], 10, 10, 600, 400).Chart
  .SetSourceData Source:=Sheets("Data").Range([2])
End With
Drag options to blanks, or click blank then click option'
AxlSunburst
BxlPie
C"A1:C10"
D"B2:D15"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong chart type constant.
Not quoting the range string properly.
5fill in blank
hard

Fill all three blanks to create a treemap chart, set its title, and specify data range.

Excel
With ActiveSheet.Shapes.AddChart2(251, [1], 20, 20, 450, 350).Chart
  .SetSourceData Source:=Sheets("Sheet1").Range([2])
  .ChartTitle.Text = [3]
End With
Drag options to blanks, or click blank then click option'
AxlTreemap
B"A1:B20"
C"Quarterly Sales"
DxlLine
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong chart type.
Not quoting strings for range or title.
Mixing up chart types and data ranges.