# Quiz using the If formula

#### merryperson

##### Board Regular
I wanted to start a quiz using excel and having a question with the choice of 3 answers.

So I have a question what is the sum of 3 + 4
A =5
B= 6
C=7
If they put in the answer A or B they get a message saying wrong answer Try again.
if they choose correctly C they get a message Correct.
I used the If formula IF (A1= “A” “Correct’, “Try again”)and this worked but only with two answers but i want three choices to choose from
Any ideas?

### Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

#### StuLux

##### Well-known Member
Try the following:

Book1
ABC
1What is the sum of 3 + 4
2A5
3B6
4C7
Sheet1
Cell Formulas
RangeFormula
C5C5=IF(B5="","",(IF(B5="C","Correct","Incorrect")))
Cells with Data Validation
CellAllowCriteria
B5List=\$A\$2:\$A\$4

#### Fluff

##### MrExcel MVP, Moderator
this worked but only with two answers but i want three choices to choose from
Your formula will work with any number of answers, as long as there is only one correct answer.

#### JackDanIce

##### Well-known Member
To test @Fluff 's remark, you can create a drop-down list in A1 with values "A", "B", "C", "D", "E" and in B1 your formula =IF(A1="A","Correct","Try again")
Then use the drop down to select each choice and check result in B1

#### merryperson

##### Board Regular
Brilliant both work as needed much appreciated for all your wisdom

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback

Replies
12
Views
294
Replies
1
Views
79
Replies
0
Views
40
Replies
5
Views
126
Legacy 456155
L
Replies
0
Views
112