22 January 2019 | by Oliver Harrison

How to Code an Open-Ended Question into a Multiple Response Question in Q

Coding open-ended responses can often be a tedious task for market researchers. In this post, I will show you how to easily code a single open-ended text variable into a multiple response question.

In quantitative surveys, there is often a need to ask open-ended questions to garner further insights into a subject beyond a predetermined list of options. An open-ended question is where you give the respondent a text field to enter their own response without forcing them to choose from a specified list of alternatives. However, the volume and nature of these responses can pose problems when it comes time to analyze them.

One method is to code these responses into a more manageable list of items based on common themes. There are many different scenarios in which you may want to use open-ended responses to capture information. In the following example, I refer to cola brand mentions. In my particular survey I included the open-ended question ‘Please name all the cola brands you regularly drink’. This has been collected non-ideally as a single text variable which I wish to code as a multiple response or Pick Any question in Q. In this instance data collection was performed in an inferior way as best practice should be to force respondents to write different brands into different text fields so that they can be coded separately. However, we can still code in Q without issue. I will now outline the process below.

Setting up your coding

To set up coding as a multiple response question, simply highlight the text variable you wish to code in the Variables and Questions tab, right-click and select Insert Variable(s) > Code Text > New Code Frame > Manual Categorization > Mutually Overlapping Categories.

Coding your question

Q will present you with a screen with the uncoded responses on the bottom left and a box on the right for the code frame to be added. In our example, the coding screen is as follows:


  1. On the right is where you build your code frame. Right-click and it will bring up a context menu that allows you to add codes. There are other features too for renaming, adding subcodes and deleting codes. You use Add Category when you want to individually add codes one by one or Import/Export Category Names to paste or type in multiple codes at a time.
  2. Once you’re ready to start allocating uncoded responses to the code frame, simply highlight the responses on the left. The grey numbers in brackets represent the number of responses which fit this exact wording, regardless of case and leading or trailing spaces.
  3. Now select one or more code options that you wish to allocate these responses to on the right.
  4. Press Categorize as to apply your coding selection.

Once you click Save Categories, Q will save your coding as new variables in your Q project. If you ever need to return to your coding, you can right-click on these variables and select Edit Code Frame. This allows you to continue your coding (if unfinished) or perhaps allocate new uncoded responses that may arise when your data file is refreshed.

Coding by searched responses

On this occasion, I only want to code into the main brands of ‘Pepsi’ and ‘Coca-Cola’ but due to the overlap in responses between the two brands it seems easier to code by searching for specific responses instead. Q’s coding window includes an A-Z sort function and a Find option to aid searching for specific terms. The best way to use these features is to use the Show responses from: drop-down in the top left of the screen to change the displayed responses. By default, Q shows uncoded responses only but you can choose to select the code categories already created (on the right) or all responses instead.


  1. As I want to show all responses regardless of whether they have been coded or not, I select (all responses) in the Show responses from: drop-down.
  2. Next, I type the first search term, ‘Pepsi’, in the Find field. All the relevant responses will now be highlighted.
  3. In order to associate these responses with multiple code frame options, I now right-click a highlighted item to select all of them, and select the code option I want to add them to, in this case, ‘Pepsi’. Then I click the Add to button at the top right. These responses have now all been additionally assigned to this category.

Displaying your coding as a table

Once you have finished coding, you can then bring up the question as a table and use it in your analysis.

Discover how to do more in Q!

Author: Oliver Harrison

After completing a PhD in German history and literature, Oliver swapped old dusty books for computer screens and logic. He then enjoyed the next 10 years as a survey programmer and data analyst in the Australasian market research industry. Today Oliver is passionate about problem-solving and helping customers achieve their goals as a member of the Customer Success team at Displayr.

No comment. Share your thoughts.

Leave a Reply

Your email address will not be published. Required fields are marked *