Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Answering Questions in Order.

Answering Questions in Order

Written by Allen Wyatt (last updated March 16, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


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 (8386) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel 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

Aligning Positive and Negative Whole Numbers in a Column

When you use a table to present numeric information, you may want to have Word align the numbers in the table. This can ...

Discover More

Cannot Convert a Document File to a Readable Document

Open a Word document file, and you can start to make edits and changes to your heart's content. But what happens if the ...

Discover More

Determining the Hour of the Day

Need to know the current hour of the day? You can derive the information in your macros by using the Hour function, as ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Handling Validation for Proper Latitude

When setting up Excel for data entry, you often have to be concerned with what values are acceptable. For example, if ...

Discover More

Using Data Validation

Want to control what users put into a cell? It's easy to do using a feature called data validation, as described in this tip.

Discover More

Limiting Entry of Names

When inputting information into a worksheet, you may need a way to limit what can be entered. This scenario is a prime ...

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 ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu 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.