ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Projects
  3. How to Make a Self-Marking Quiz in Excel

How to Make a Self-Marking Quiz in Excel

By ExcelReady Team·Updated November 3, 2026·5 min read

The short answer

To make a self-marking quiz in Excel, list the questions in one column and let people pick answers from drop-down lists. Keep the correct answers on a separate key sheet. Mark each question with =IF(C2="","",IF(C2=Key!B2,1,0)), add up the score with =COUNTIF(D2:D11,1), then hide and protect the key.

Key takeaways

  • Put questions, answers, marks and the score on the quiz sheet, and the correct answers on a separate key sheet.
  • Drop-down lists from Data > Data Validation stop typos that would mark a right answer wrong.
  • =IF(C2="","",IF(C2=Key!B2,1,0)) marks a question and stays blank until it is answered.
  • =COUNTIF(D2:D11,1) counts the correct answers; divide by the number of questions for a percentage.
  • Hiding and protecting the key stops casual peeking, but it is not strong security.
On this page+
  1. How a self-marking quiz works
  2. Step 1: Add drop-down lists for the answers
  3. Step 2: Mark each question with IF
  4. Step 3: Add feedback and the score
  5. Add checkbox questions
  6. Hide the answer key
  7. Ideas to extend the quiz
  8. Practise it

You can make a quiz in Excel that marks itself with two everyday functions: IF compares each answer with the correct one, and COUNTIF adds up the score. Drop-down lists keep answers tidy, a hidden key sheet holds the correct answers, and a few extra formulas give instant feedback. This guide builds a five-question quiz step by step, for teachers, trainers and anyone who wants to practise IF and COUNTIF on a real project.

How a self-marking quiz works#

A self-marking quiz has two sheets. The Quiz sheet holds what people see: questions, answer cells, marks and the score. The Key sheet holds the correct answers. Formulas on the Quiz sheet compare the two.

Here is the Quiz sheet:

ABCDE
1No.QuestionYour answerMarkFeedback
21Which function adds numbers?
32What does =10/4 return?
43Which symbol locks a cell reference?
54Which shortcut undoes on Windows?
65Which function counts cells that match one condition?

Create a second sheet named Key, with the question numbers in A2:A6 and the correct answers in B2:B6: SUM, 2.5, $, Ctrl+Z and COUNTIF. Keep each answer in the same row as its question on the Quiz sheet, so row 2 always matches row 2.

If you need questions for an Excel skills quiz, our list of Excel quiz questions with answers is a good source.

Step 1: Add drop-down lists for the answers#

A drop-down list makes sure people pick an answer exactly as the key spells it. A typed "Sum " with a trailing space would be marked wrong, even though it is right.

  1. Click C2, the answer cell for question 1.
  2. Go to Data > Data Validation.
  3. Under Allow, choose List.
  4. In Source, type the options separated by commas: SUM,COUNT,AVERAGE.
  5. Click OK, then repeat for each question with its own options.

To reuse the same options, such as True and False, set up one cell and copy it down. Our guide to drop-down lists in Excel covers lists that read from a range of cells.

Step 2: Mark each question with IF#

IF checks a condition and returns one value if it's true and another if it's false. In D2, type:

Excel formula
=IF(C2="","",IF(C2=Key!B2,1,0))

Fill it down to D6. Read it from the outside in:

  • C2="" checks whether the question is unanswered. If so, the mark stays blank instead of showing 0.
  • C2=Key!B2 compares the answer with the key. A correct answer scores 1, a wrong one 0.

The = comparison ignores capital letters, so "sum" matches "SUM". If case must match, use EXACT(C2,Key!B2) as the test instead. For typed answers, wrap the answer in TRIM, TRIM(C2)=Key!B2, so extra spaces don't cost a mark.

To accept more than one answer, test each with OR: =IF(OR(C5="Ctrl+Z",C5="Control+Z"),1,0). The IF function guide and our article on how the IF function works cover more patterns.

Step 3: Add feedback and the score#

Feedback tells people right away how they did on each question. In E2, type and fill down:

Excel formula
=IF(D2="","",IF(D2=1,"Correct","Not quite"))

Then add a score panel to the right, in G1:H4:

LabelFormulaExample result
Score=COUNTIF(D2:D6,1)4
Questions=COUNTA(B2:B6)5
Percent=H1/H280%
Result=IF(COUNTA(C2:C6)<H2,"Answer every question",IF(H3>=0.8,"Pass","Try again"))Pass

COUNTIF counts the cells in D2:D6 that equal 1, which is the number of correct answers. The Result formula waits until every question is answered, then compares the percentage with a pass mark of 80%. Change 0.8 to set your own pass mark. The COUNTIF function guide and our COUNTIF article explain the criteria.

To colour the marks, select D2:D6, choose Home > Conditional Formatting > Highlight Cells Rules > Equal To, and set 1 to green fill. Add a second rule for 0 with red fill.

Add checkbox questions#

For "select all that apply" questions, checkboxes work well. In Excel for Microsoft 365, select the cells and choose Insert > Checkbox. Each box holds TRUE when ticked and FALSE when not.

Say options for one question sit in C8:C11, and the key has TRUE or FALSE for each option in Key!B8:B11. This marks the question correct only if every box matches:

Excel formula
=IF(AND(C8:C11=Key!B8:B11),1,0)

In older versions of Excel, use Developer > Insert > Check Box (Form Control) and link each box to a cell. Older versions may also need Ctrl+Shift+Enter for the range comparison above. Our guide to checkboxes in Excel covers both types.

Hide the answer key#

Hide and protect the key so people don't simply look up the answers:

  1. Right-click the Key tab and choose Hide.
  2. Go to Review > Protect Workbook, tick Structure, and set a password. Now the sheet can't be unhidden without it.
  3. On the Quiz sheet, select the answer cells C2:C6, press Ctrl+1 (Mac: ⌘1), open the Protection tab and untick Locked.
  4. Select the mark and feedback formulas, and on the same tab tick Hidden, so the formulas don't show in the formula bar.
  5. Go to Review > Protect Sheet and set a password.

People can now choose answers but can't change formulas or see the key. Excel's protection is designed to prevent accidental changes, not to stop someone determined, so don't use it for high-stakes tests. Our guide to protecting a sheet and locking cells has more detail.

Ideas to extend the quiz#

Once the basic quiz works, try these:

  • A results sheet that records each person's score for a class, like a gradebook in Excel.
  • Points per question, with a Points column and =SUMIF(D2:D6,1,F2:F6) to add the points for correct answers.
  • A reset step: select the answer cells and press Delete. The marks, feedback and score clear themselves.

Practise it#

Try the exercise on this page to score a quiz with COUNTIF. Then practise the IF function in a live spreadsheet to write marking formulas, and practise COUNTIF to count correct answers and pass marks. Both lessons check your formula instantly. To test your own skills, take the Excel level test.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Column D already marks each answer: 1 for correct, 0 for wrong, blank if unanswered. In E2, calculate the score by counting the 1s in D2:D7 with COUNTIF.

fx
ABCDEF
1
Question
Answer given
Correct answer
Mark
Score
2
Q1
SUM
SUM
1
3
Q2
2.5
2.5
1
4
Q3
#
$
0
5
Q4
Ctrl+Z
Ctrl+Z
1
6
Q5
COUNTIF
7
Q6
COUNTA
COUNTA
1
8
9
10

Tip: COUNTIF takes the range to check, then what to count: the number 1.

Practise this in a lesson

LessonThe IF functionMake a cell show one result or another depending on a condition, like Pass/Fail or Over/Under budget.LessonCOUNTIFCount the cells that match a condition, from exact words to number checks like ">=8".Function guideIFLearn Excel's IF function with practical examples: flag budgets, label rows and return blanks. Avoid the classic mistakes and practice live.Function guideCOUNTIFCount cells that match one condition with COUNTIF: text, numbers, wildcards and cell references. Real examples and a live exercise.

Frequently asked questions

Can you make a quiz in Excel?

+

Yes. Put the questions in a column, add drop-down lists for the answers, and use IF formulas to compare each answer with an answer key. COUNTIF then adds up the score automatically.

How do I make Excel check if an answer is correct?

+

Compare the answer cell with the correct answer inside IF: =IF(C2=Key!B2,"Correct","Wrong"). The = comparison ignores capital letters; use EXACT if case must match.

How do I hide the answers in an Excel quiz?

+

Put the answers on a separate sheet, right-click its tab and choose Hide, then use Review > Protect Workbook so the sheet can't be unhidden without a password. This deters casual users but isn't secure against a determined one.

How do I add up the score in an Excel quiz?

+

If each mark cell holds 1 for correct and 0 for wrong, use =COUNTIF(D2:D11,1) or =SUM(D2:D11). Divide by the number of questions, =COUNTA(B2:B11), and format it as a percentage.

Can I add checkboxes to an Excel quiz?

+

In Microsoft 365, select cells and choose Insert > Checkbox; each box holds TRUE or FALSE, which formulas can mark. In older versions, use a Form Control check box from the Developer tab and link it to a cell.

Sources

  • IF function - Microsoft Support
  • Create a drop-down list - Microsoft Support
  • Protect a worksheet - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How a self-marking quiz works
  2. Step 1: Add drop-down lists for the answers
  3. Step 2: Mark each question with IF
  4. Step 3: Add feedback and the score
  5. Add checkbox questions
  6. Hide the answer key
  7. Ideas to extend the quiz
  8. Practise it

Keep reading

Tests & careers· 5 min read

Excel Quiz Questions and Answers to Test Yourself

Good Excel quiz questions check three things: the basics (cell names, references, shortcuts), what formulas return (order of operations, error values, COUNT vs COUNTA), and simple logic on a table (IF, COUNTIF, SUMIF). Answer the 12 questions below without opening Excel, then check each answer and its explanation.

Logic· 6 min read

The Excel IF Function Explained Simply

The Excel IF function checks a condition and returns one value when it's TRUE and another when it's FALSE. The syntax is =IF(logical_test, value_if_true, value_if_false). For example, =IF(B2>=70,"Pass","Fail") shows Pass for a score of 70 or more and Fail for anything lower. Text results go in double quotes.

Conditional math· 6 min read

How to Use COUNTIF in Excel (With Criteria Examples)

COUNTIF counts the cells in a range that meet one condition. Write =COUNTIF(range, criteria), for example =COUNTIF(D2:D9,"Open") to count open tickets. Put text and comparisons in double quotes, like ">=8" or "<>Low". Numbers and cell references go in without quotes. For two or more conditions, use COUNTIFS.

More on projects

  • How to Calculate Shift Differential Pay in Excel
  • Make a Weekly Shift Schedule in Excel
  • Build a Simple Customer Tracker (CRM) in Excel
  • How to Build a Skills Matrix in Excel for Your Team
  • How to Build an SLA Tracker in Excel With Working Hours
  • How to Split Shared Expenses in Excel Between Friends
All projects articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free