Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Answering Questions in Order.

Answering Questions in Order

Written by Allen Wyatt (last updated October 9, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


Kim created a form in Excel that relies upon data validation to present answers using drop-down lists. There are a series of questions in the form. He wonders if there is a way to force the questions to be answered in order. He would like, for instance, for the user to answer question 1 before going to question 2, etc.

Accomplishing this sort of task may scream out for using a macro or creating a user form, but you don't need to go this route. (Using macros and user forms are very powerful, but they are also more complex than some people may want.) You can get a level of "orderliness" by simply adjusting the specifications you use in your data validation drop-down lists.

As an example, you'll want to set up a few named ranges in your workbook. Pick a cell and name it "Default". In that cell put a default message, such as the text "Answer questions in order." In another named range (perhaps named "Q1Answers") you would include the list of acceptable answers for your first question. Finally, you should assign a name to the cell that will contain the user's answer to the question, such as "Q1Response." You could create similar named ranges for the other acceptable answers and responses to your other questions (Q2Answers, Q3Answers, Q2Response, etc.).

Then, in your validation check for each of your questions you can use a formula to specify what Excel should use as the possible answers. In this scenario the validation settings for question 1 are easy; just set the Allow setting to List and specify (in the Source box) that you want to use the Q1Answers range used. For subsequent questions, however, you should use a formula in the Source box. For instance, for question 2 you should use the following formula in the Source box:

=IF(OR(Q1Response="",Q1Response=Default),Default,Q2Answers)

For each subsequent question you would change the Q1 designation to whatever is appropriate for the previous question and change the Q2 designation to whatever is appropriate for the current question. The formula works because it specifies that if the response to question 1 is empty or it is equal to the Default value ("Answer questions in order"), then the Default answer is displayed as the choice for question 2. If neither of those conditions exist, then the responses for question 2 are displayed and selectable. If people try to answer the questions when an earlier question has not been answered, the only drop-down option visible will be the Default value ("Answer questions in order").

You can take this approach one step further, if you want, by adding conditional formatting to the mix. If you use the same sort of testing (to see if the previous question was answered), you could modify the formatting of the cells containing your questions. For instance, if the previous question has not been answered, then simply format the later questions so that they appear as white type. That makes them disappear into the white background of the cell. Then, as each question is answered, the next question would seem to appear, in order.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8384) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Answering Questions in Order.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Locking Callouts to a Graph Location

If you add callouts using the drawing tools in Excel, you may have noticed that they don't always stay where you expect ...

Discover More

Header and Footer Formatting Codes

When creating headers and footers in an Excel worksheet, you can use special codes to add or format information. This tip ...

Discover More

Merging to Individual Files

The mail-merge feature in Word is a fast, easy way to create form letters addressed to many different people. Sometimes, ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Ensuring Unique Values in a Column

If you want to make sure that only unique values are entered in a particular column, you can use the data validation ...

Discover More

Don't Allow Empty Cells

Data Validation is a great way to limit what a user can enter into a worksheet cell. It may not stop a cell from being ...

Discover More

Specifying a Data Validation Error Message

Data validation is a great tool for limiting what can be input into a cell. Excel allows you to specify what should ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.