Bird
Raised Fist0
Excelspreadsheet~20 mins

Recording macros in Excel - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Macro Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
What is the output of this recorded macro?
You recorded a macro that selects cell A1, types the number 10, then moves to cell B1 and types the formula =A1*2. What value will appear in cell B1 after running the macro?
Excel
Sub Macro1()
    Range("A1").Select
    ActiveCell.Value = 10
    Range("B1").Select
    ActiveCell.Formula = "=A1*2"
End Sub
A20
B0
C10
D#REF!
Attempts:
2 left
💡 Hint
Remember the formula in B1 multiplies the value in A1 by 2.
❓ Function Choice
intermediate
1:30remaining
Which VBA command correctly stops a macro recording?
You want to stop recording your macro in Excel VBA. Which command will correctly end the macro?
AEnd Macro
BStop Recording
CExit Macro
DEnd Sub
Attempts:
2 left
💡 Hint
Look for the standard way to end a VBA subroutine.
🎯 Scenario
advanced
2:30remaining
You recorded a macro but it always types the same text. How to make it type text from a cell instead?
Your recorded macro types the text "Hello" in cell A1 every time. You want to change it so it types whatever text is in cell B1 instead. Which VBA line should replace the fixed text?
Excel
ActiveCell.Value = "Hello"
AActiveCell.Value = Range("B1").Value
BActiveCell.Value = "Range(B1)"
CActiveCell.Value = Cells(B1)
DActiveCell.Value = Range(B1)
Attempts:
2 left
💡 Hint
To get a cell's content, you need to use .Value property of a Range object.
❓ data_analysis
advanced
2:00remaining
What error occurs if you run this macro on a protected sheet?
This macro tries to change cell A1's value on a protected worksheet without unprotecting it first. What error will it cause?
Excel
Sub ChangeCell()
    Range("A1").Value = 100
End Sub
ASyntax error: Missing End Sub
BRun-time error '1004': Application-defined or object-defined error
CNo error, value changes successfully
DCompile error: Invalid procedure call
Attempts:
2 left
💡 Hint
Protected sheets prevent changes to locked cells.
🧠 Conceptual
expert
3:00remaining
How many times will this recorded macro loop run?
You recorded a macro that selects cell A1, types 1, then moves down one cell and types 2, then moves down one cell and types 3. You want to automate this with a loop from 1 to 3. How many times will the loop run to replicate the macro?
Excel
For i = 1 To 3
    ActiveCell.Value = i
    ActiveCell.Offset(1, 0).Select
Next i
A4 times
B2 times
C3 times
D1 time
Attempts:
2 left
💡 Hint
The loop runs from 1 to 3 inclusive.

Practice

(1/5)
1. What is the main purpose of recording a macro in Excel?
easy
A. To automate repetitive tasks by recording your actions
B. To create complex formulas automatically
C. To protect your worksheet from editing
D. To format cells with a single click

Solution

  1. Step 1: Understand what macros do

    Macros record your actions to repeat them later without manual work.
  2. Step 2: Identify the main use

    Recording macros helps automate repetitive tasks, saving time and effort.
  3. Final Answer:

    To automate repetitive tasks by recording your actions -> Option A
  4. Quick Check:

    Macro recording = automate tasks [OK]
Hint: Macros save time by repeating your exact steps [OK]
Common Mistakes:
  • Thinking macros create formulas automatically
  • Confusing macros with worksheet protection
  • Assuming macros only format cells
2. Which of the following is the correct way to start recording a macro in Excel?
easy
A. Go to Insert tab > Shapes > Record Macro
B. Go to View tab > Macros > Record Macro
C. Right-click a cell and select Record Macro
D. Press Ctrl + R to start recording

Solution

  1. Step 1: Locate macro recording option

    In Excel, macros are recorded from the View tab under Macros.
  2. Step 2: Confirm correct menu path

    The correct path is View tab > Macros > Record Macro, not Insert or right-click menus.
  3. Final Answer:

    Go to View tab > Macros > Record Macro -> Option B
  4. Quick Check:

    Record Macro location = View > Macros [OK]
Hint: Find Record Macro under View tab > Macros [OK]
Common Mistakes:
  • Looking under Insert tab instead of View
  • Trying to record macro from right-click menu
  • Using wrong keyboard shortcuts
3. You recorded a macro that formats selected cells with bold text and yellow fill. What happens when you run this macro on a new selection?
medium
A. The new selection becomes bold with yellow fill
B. The macro asks you to select cells again
C. The macro deletes the contents of the new selection
D. Nothing happens because macros only work on original cells

Solution

  1. Step 1: Understand macro behavior

    Macros repeat recorded actions on the current selection when run.
  2. Step 2: Apply macro to new selection

    Running the macro applies bold and yellow fill to whatever cells are selected now.
  3. Final Answer:

    The new selection becomes bold with yellow fill -> Option A
  4. Quick Check:

    Macro applies recorded formatting to current selection [OK]
Hint: Macros repeat actions on current selection, not original cells [OK]
Common Mistakes:
  • Thinking macro asks for input each time
  • Believing macro deletes data accidentally
  • Assuming macros only work on original cells
4. You recorded a macro but when you run it, it does not perform any action. What is the most likely reason?
medium
A. You did not select any cells before running
B. You saved the macro with a wrong name
C. Macros only work on Excel tables
D. You forgot to stop recording the macro

Solution

  1. Step 1: Check macro recording status

    If you don't stop recording, Excel does not save the actions properly.
  2. Step 2: Understand effect of not stopping

    Without stopping, the macro is empty or incomplete, so running it does nothing.
  3. Final Answer:

    You forgot to stop recording the macro -> Option D
  4. Quick Check:

    Stop recording to save macro actions [OK]
Hint: Always click Stop Recording to save macro [OK]
Common Mistakes:
  • Assuming macro name affects execution
  • Thinking selection is required before running
  • Believing macros only work on tables
5. You want to create a macro that formats a report: sets font size to 12, applies bold to headers, and autofits columns. Which sequence of actions should you record to make the macro work correctly on any report?
hard
A. Select headers, bold them; autofit columns; select all cells, set font size 12
B. Autofit columns; select headers, bold them; set font size 12 on all cells
C. Select all cells, set font size 12; select headers, bold them; autofit columns
D. Set font size 12; autofit columns; select headers, bold them

Solution

  1. Step 1: Plan macro steps logically

    First set font size for all cells, then bold headers, then autofit columns for best results.
  2. Step 2: Record actions in correct order

    Recording font size on all cells first ensures uniform text; bolding headers after targets only headers; autofit last adjusts column widths.
  3. Final Answer:

    Select all cells, set font size 12; select headers, bold them; autofit columns -> Option C
  4. Quick Check:

    Order matters: font size, bold headers, autofit [OK]
Hint: Set font size first, then bold headers, autofit last [OK]
Common Mistakes:
  • Bold headers before setting font size on all cells
  • Autofitting columns before formatting text
  • Not selecting correct cells for each step
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard