Challenge - 5 Problems
Chart Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🎯 Scenario
intermediate2:00remaining
Move a chart to a new worksheet
You have a chart embedded in Sheet1. You want to move it to a new chart sheet named "SalesChart". Which Excel action or method will do this correctly?
Attempts:
2 left
💡 Hint
Look for the built-in option to move charts to a new sheet.
✗ Incorrect
The 'Move Chart...' option allows moving a chart to a new chart sheet with a specified name. Cutting and pasting to a worksheet does not create a chart sheet. Dragging tabs moves worksheets, not charts. Pasting as a picture loses chart functionality.
📊 Formula Result
intermediate2:00remaining
Resize a chart using VBA code
You run this VBA code to resize a chart named 'Chart 1' on Sheet1:
Sub ResizeChart()
Worksheets("Sheet1").ChartObjects("Chart 1").Width = 400
Worksheets("Sheet1").ChartObjects("Chart 1").Height = 300
End Sub
What will be the width and height of the chart after running this code?
Excel
Sub ResizeChart() Worksheets("Sheet1").ChartObjects("Chart 1").Width = 400 Worksheets("Sheet1").ChartObjects("Chart 1").Height = 300 End Sub
Attempts:
2 left
💡 Hint
Width and Height properties set the size in points.
✗ Incorrect
The code sets the Width property to 400 points and Height to 300 points for the chart named 'Chart 1'. This changes the chart size accordingly.
❓ Function Choice
advanced2:00remaining
Which VBA property moves a chart?
You want to move a chart object named 'SalesChart' on Sheet2 to the left by 50 points and down by 30 points using VBA. Which property should you modify?
Attempts:
2 left
💡 Hint
Think about properties that control position on the sheet.
✗ Incorrect
The .Left and .Top properties control the horizontal and vertical position of the chart on the worksheet. Width and Height control size. There is no .Position or .Location property for ChartObjects.
📊 Formula Result
advanced2:00remaining
Effect of resizing chart with negative values
What happens if you run this VBA code?
Sub ResizeNegative()
Worksheets("Sheet1").ChartObjects("Chart 1").Width = -100
Worksheets("Sheet1").ChartObjects("Chart 1").Height = -50
End Sub
Excel
Sub ResizeNegative() Worksheets("Sheet1").ChartObjects("Chart 1").Width = -100 Worksheets("Sheet1").ChartObjects("Chart 1").Height = -50 End Sub
Attempts:
2 left
💡 Hint
Width and Height cannot be negative numbers.
✗ Incorrect
Setting Width or Height to negative values causes a runtime error because these properties must be positive numbers.
❓ data_analysis
expert3:00remaining
Analyze chart position after multiple moves
A chart on Sheet3 has initial .Left = 100 and .Top = 150. You run this VBA code:
With Worksheets("Sheet3").ChartObjects("Chart 1")
.Left = .Left + 50
.Top = .Top - 20
.Left = .Left - 30
.Top = .Top + 10
End With
What are the final .Left and .Top values of the chart?
Excel
With Worksheets("Sheet3").ChartObjects("Chart 1") .Left = .Left + 50 .Top = .Top - 20 .Left = .Left - 30 .Top = .Top + 10 End With
Attempts:
2 left
💡 Hint
Add and subtract the changes step by step.
✗ Incorrect
Initial Left=100, add 50 → 150, subtract 30 → 120. Initial Top=150, subtract 20 → 130, add 10 → 140.