Coding survey data in Excel: prepare your dataset for analysis

Coding survey data in Excel means turning responses into organised variables whose meaning can be checked later. Every column needs a clear definition...

Published: About 14 minutes to read
A person organises survey sheets with a binder clip on a desk beside a laptop.
Organising responses and preparing a dataset for analysis.

Your survey responses are in Excel. There are ratings, longer comments and empty cells, but you are not sure how to start preparing the results for your thesis. First, organise the file so that each answer keeps its meaning and can be counted correctly. That is what coding survey data is for. You do not need programming skills, but you do need to make a few considered decisions.

We will work through them using a survey about consultations during thesis writing. You will see what to do with a missing rating, how to separate several selected answers and when to leave a cell empty. You will also learn what to send to the person analysing your results so they do not have to guess what participants were asked. At this stage, we are preparing responses for analysis, not yet drawing conclusions about the people surveyed.

Start with a copy and keep the original responses

After downloading responses from Google Forms or another survey tool, save the original file and leave it unchanged. Make a working copy and add the date to its name. Keep a brief note of what you change and why. Something as simple as “removed h from the hours column, keeping the number entered” is enough. This lets you distinguish a participant's answer from your own correction and check that the correction has not changed what the answer means.

In a survey completed once, each row usually contains one person's responses. Give each questionnaire a permanent number, such as S001, S002 or S003, in a separate column. The row number displayed down the side of Excel is not enough because responses change position when sorted. If the same people answered before and after a class, also keep a record of which occasion each response belongs to. Do not treat two measurements from one person as two separate participants.

Do not include names, email addresses or phone numbers in the file intended for analysis. If you need to know which questionnaire belongs to which person, keep that link in a separate, appropriately protected file. Replacing a name with a number does not make responses fully anonymous if you can still identify who provided them. Check written comments as well: a participant may have included personal details in their own words.

Three questionnaires and three decisions: what should go in Excel?

In the following example, students rate the usefulness of consultations from 1 to 5 and indicate which forms of contact they used. They can select email, an in-person meeting and a video call. We also ask whether they do paid work. Only those who answer “yes” see the question about hours worked during the previous week. Let us look at how to prepare three different responses.

S001: all the required answers are present

The person rated consultations 4, used email and an in-person meeting, does paid work and reported 20 hours. Keep the rating of 4 and the number 20. We will record email and the meeting separately so that each form of contact can be counted later. We do not choose one of the two answers on the participant's behalf.

S002: an empty cell because the question did not apply

The consultation rating is 2, the selected form of contact is a video call and the answer about paid work is “no”. The survey did not show the hours question. Leave that cell empty and record “not applicable: question skipped according to the survey instructions” beside it. Do not enter zero simply to fill the cell.

S003: an empty cell where an answer was needed

The person used email and said that they do paid work, but did not give a consultation rating or the number of hours worked. Record these as missing answers. Do not replace the missing rating with 1 or fill in the hours using the average from the other questionnaires. We do not know what this person would have answered.

Two empty cells look the same in a spreadsheet but can mean quite different things. Alongside the number itself, it is worth keeping a note of why it is absent. Later, this will help you establish how many people actually answered a particular question.

If you are unsure how to organise the responses you downloaded, you can start by sending the questionnaire and a file without personal details. Through “Analysis and presentation of research results for your thesis”, we can establish what needs preparing before the results are calculated. You do not need to fix every empty cell yourself or reshape the spreadsheet by following an unrelated tutorial first.

Add a short explanation of what each column means

A heading such as “Question 3” may mean very little to you a few weeks later. Add explanations on a separate sheet. This is called a variable dictionary or codebook: here, a variable simply means a piece of information recorded in a column, such as the consultation rating. You do not need lengthy documentation. You need enough detail for you and the person helping with the analysis to understand the answers in the same way.

  • Column name: for example, “Consultation rating” rather than just “Q3”.
  • Exact question: copy it from the questionnaire participants received.
  • Meaning of the answers: explain what 1, 2, 3, 4 and 5 mean, using the scale descriptions in the survey.
  • What is being measured: a rating, hours worked or membership of a group, such as mode of study.
  • Empty cells: note who was meant to answer and how you identify a missing response.
  • Changes made: describe any score conversions or other corrections that were needed.

AGH University Library recommends including descriptions of variables in data documentation. In practice, this prevents a simple mistake: the code 1 must not sometimes mean “yes” and sometimes “no” in the same column. Do not identify groups using cell colours alone either, because colours may disappear when the file is transferred to another program. If the difficulty is deciding what a question actually measures, see “Operationalising variables in a thesis: indicators, measurements and examples”.

When should you turn answers into numbers and when should you keep words?

“Full-time study” and “part-time study” can be recorded as 1 and 2. Here, the numbers are simply labels. They do not mean that the second mode of study is twice as large or twice as good. Similarly, ratings from 1 to 5 have a set order, but numbering the answers does not prove that the distance between each pair of adjacent ratings is equal.

You do not have to turn every word into a number. It depends on the planned analysis and the software being used. What matters is recording answers consistently and explaining what the entries mean. If numeric codes have been agreed, include their definitions. The APS textbook discusses labelling answers separately from identifying missing values. This is a useful distinction: “missing answer” is not another rating on the scale.

Also check answers that are supposed to be numbers. An entry such as “20 h” is best separated into the number 20 in the cell and a note that the column contains hours. However, do not remove leading zeros from a questionnaire number if “001” is used to identify it. Record dates unambiguously, for example as year, month and day. Depending on the software settings, 03/04 can be read as either 3 April or 4 March.

What should you do with empty cells, zero and “I don't know”?

Return to the hours-worked question. Beside the column of numbers, you can add a column called “Notes on the response”. Use it to record whether hours were provided, whether the person left the question unanswered or whether the survey never showed it to them. This keeps a student who does no paid work distinct from a student who works but did not report their hours.

  • 0: the participant actually entered zero, and the question allows that answer.
  • Missing answer: the person was meant to answer but did not provide a value.
  • Not applicable: under the survey's instructions, the question was not intended for this person.
  • I don't know or prefer not to answer: keep that information if the person selected that option.

If all you have is an empty cell, do not guess why someone left it blank. Check the wording and order of the questions. If you still cannot establish the reason, record that uncertainty. Before your next survey, it is worth testing which questions each participant will see. The Statistical Office in Poznań also draws attention to links between questions and trying out a questionnaire before collecting responses.

Take care with special codes such as 99 or -9. If they mean “missing”, they must not later be included in the average rating or hours worked. Excel will treat them as ordinary numbers unless the calculation excludes them. Do not fill every empty cell with other people's average answer either. First, establish how many responses are missing, which questions they concern and what the questionnaire's instructions require.

This is where a consultation before running tests can help. Through “Statistical analysis for bachelor’s and master’s theses”, we can establish how to handle missing answers and which responses can be used in the planned calculations. The purpose is to preserve what the data mean, not to adjust them until a result supports your hypothesis.

What if some questions are scored differently?

Some established questionnaires require certain responses to be converted before points are added together. For example, one statement might describe feeling at ease during presentations and another might describe tension. First, check the instructions for that particular questionnaire. Negative wording alone does not mean that a score must be reversed. Do not make that decision only after seeing the results.

If the instructions require reversing scores from 1 to 5, an answer of 1 becomes 5 points, 2 becomes 4 and 3 remains 3. Likewise, 4 becomes 2 and 5 becomes 1. Record the converted points in a new column and keep the original response beside them. If the scale starts at zero, the conversion will be different. Do not copy a scoring rule from another questionnaire.

Optional: a formula if you are converting the scores yourself

For responses from 1 to 5 in D2, you can enter =JEŻELI(D2="";"";6-D2) in a new column in Polish Excel. In English Excel, use =IF(D2="","",6-D2); the separator depends on your settings. The formula leaves a blank entry empty and subtracts a provided answer from 6. Use it only after checking that cells contain numbers from 1 to 5 or are empty. For a range of 0 to 4, the response is subtracted from 4.

Manually check at least answers 1, 3 and 5, together with an empty cell. A result of 6 would indicate an error on this scale. You do not need to use the formula if you are preparing a file for someone else to analyse: include the questionnaire instructions and leave the responses unchanged. Adding or averaging several questions is appropriate only where the instrument's scoring rules allow it, including its rules for incomplete responses.

How do you record a question with several possible selections?

In the consultation survey, one person could select both email and an in-person meeting. Both answers matter. To make them easier to count, create separate columns called “Email”, “Meeting” and “Video call”. For a person who answered the question, enter 1 for a selected option and 0 for an option they did not select. Our three questionnaires would look like this:

  • S001: email 1, meeting 1, video call 0.
  • S002: email 0, meeting 0, video call 1.
  • S003: email 1, meeting 0, video call 0.

If someone did not answer the question at all, do not automatically enter three zeros. “I use none of these” does not necessarily mean the same as “I did not answer”. A separate “none of the above” option helps. Kent State University's guide shows how distinguishing these situations affects the subsequent counts. If the survey does not distinguish them, keep a note of that limitation rather than assigning a choice to the participant.

Remember that you can count people or all selections. A student who uses two forms of contact is one person but contributes two selections. Percentages calculated using people as the denominator therefore do not have to add up to 100%. Do not remove a second choice to “fix” the total. If you separate answers automatically, check several rows manually: similar option names or commas within an answer can lead to mistakes.

How can you organise answers written in participants' own words?

Asked “What makes it difficult to attend consultations?”, someone writes: “They clash with work, and travelling there takes an hour.” Keep the complete response. Beside it, you can record two themes: an inconvenient time and travel. Do not shorten it to “lack of time”, because part of the information would disappear. If you plan to count themes, decide first whether a response can belong to more than one group.

Read some of the responses and explain what belongs in each group. Check whether the same rules can be applied to the remaining comments. If you change a group's definition, revisit earlier responses too. You can correct a typing error in a working copy, but do not change the meaning of a participant's words. Before sharing the material, remove details that could identify them, such as a name included in a longer comment.

A final check: does the file still match the questionnaire?

Before calculating results, look for ordinary recording errors. A rating of 7 in a question with a 1-5 scale needs investigating. A very large but possible number of hours, however, is not automatically a mistake. Compare it with the question and the original response. Preparing data is about correcting errors, not removing answers that make the result you expected harder to obtain.

  1. Check that the number of questionnaires matches the downloaded file and that each has its own number.
  2. Look through the answers in each column for typing errors, extra spaces and entries the questionnaire did not allow.
  3. Check permitted ratings and the order of questions, such as hours worked for people who answered “I do not work”.
  4. Count missing answers separately for each question. Distinguish situations where the question did not apply.
  5. Compare several converted scores and multiple-choice answers with the originals.
  6. Make sure sorting moved complete rows, rather than just one column of answers.
  7. If a questionnaire will not be included in the analysis, record the reason and keep it in the original file.

Two identical sets of answers do not prove that one person submitted the questionnaire twice. Before deleting anything, check what evidence you have of a repeat submission. You may need submission times or an agreed method of identifying questionnaires. Similar answers alone are not enough. Recording the decision will help you explain why your analysis includes fewer questionnaires than you originally downloaded.

What should you send with the responses so they can be analysed?

It is usually convenient to keep an Excel file in XLSX format, with separate sheets for responses, explanations and notes on changes. If the person analysing the results needs CSV, agree how to save it. CSV transfers data from a single sheet, not the complete set of explanations. Reopen the file and check that columns have not merged, Polish and Ukrainian characters are readable, and numbers and dates are unchanged.

If formulas were used, also keep a version in which the calculations can be checked. Agree whether a file containing only the results of those formulas is needed for the next stage. Check empty cells too: a cell that looks blank can contain a formula, and the next program may not recognise it as a missing answer. Comparing a few such entries after opening the file can prevent later errors.

Include the exact questionnaire, explanations of the columns, scoring instructions for any scales and your research questions. Note what has already been changed and which responses are uncertain. This allows the analysis to begin without having to guess what the numbers mean. The next stage is covered in “How to analyse survey results for a thesis: Excel and examples”.

Sources and how they are used

The following resources help distinguish descriptions of responses, missing-answer rules and file preparation. When converting scores, you also need the instructions for the questionnaire you actually used.

Frequently asked questions

Are charts from Google Forms sufficient for statistical tests?

Usually, a database of individual responses is required, for example an export to XLSX or CSV. Aggregate charts alone often do not allow reconstructing relationships between answers or calculating correlations. Please also send the questionnaire and the scoring key for scales, if used.

Is Excel enough for analysing survey results?

For organising data, simple summaries, percentages, and charts, a spreadsheet may be enough. More complex analysis requires appropriate tools and knowledge of their assumptions. The choice of software should be based on the task. The software itself does not assess whether the analysis method fits the research design.

When analysing survey results, will you account for missing responses and questions that allow multiple answers?

Yes. Send the questionnaire and the spreadsheet with responses, along with an explanation of the notation used. I will help organise the counts, the base for calculating percentages, and table descriptions, so it is clear how many people the summary covers and how missing responses were handled.

Can I describe a calculation error as a study limitation?

Correct a fixable error first and check its impact on other results. A limitations paragraph does not replace correcting a denominator, coding rule or formula. If information cannot be recovered, report the gap and its consequences without inventing values.

Not sure what to do with the responses you downloaded?

Send me your questionnaire, the responses without personal details and the questions you want to answer in your thesis. Tell me what is difficult: empty cells, several answers in one cell, scoring or preparing the whole spreadsheet. I will review the material and suggest the support you need. We will establish whether organising the data is enough or whether you also need analysis and help presenting the results. We will agree the price and deadline before work begins.

Analysis and presentation of research results for your thesisStatistical analysis for bachelor’s and master’s theses
Discuss your survey responses with Wiola

Related articles

How to design a research questionnaire without confusion or random questions

A research questionnaire should not be a collection of random questions. A good research instrument must follow from the thesis aim, research questions, hypotheses and variables. Learn how to prepare a questionnaire step by step so that it is easier to report the results in your research chapter later. See four survey introduction examples with participant instructions and checks of the form settings. For each question, note provisionally how you will present the answers. For single-choice questions, this may be the number of people and the percentage; for multiple-choice questions, the number of selections for each option; and for open questions, thematic categories along with a description of how they were created. Practise this on a small set of fictitious answers, clearly marked as a test. If a question about difficulties allows selecting several options, the sum of percentages of people may exceed 100%. If a question applies only to participants of consultations, percentages must be calculated for that group, not for everyone who fills in the questionnaire. Also record how missing data will be handled. No answer to the question “How many times did you use consultations?” does not mean zero consultations. Meanwhile, “I do not remember” is a provided answer with a different meaning than an empty field. If you plan to compare groups, ensure that you have a variable allowing you to identify them. If you want to calculate a composite score from several items, establish the justification for such a combination and the scoring rules in advance. Do not sum random questions just because each has answers marked with numbers from 1 to 5. We described the next stage in the guide on processing research results, percentages and comments on the questionnaire. It is worth looking at it before the study to check whether the designed questions will provide the data needed in the empirical chapter. Are you planning group comparisons or tests of associations and unsure what data you will need? Before distributing the questionnaire, you can discuss with me selecting statistical analyses for research questions. I will help determine whether the answers will allow...

Read article

How to Start a Thesis Survey: Introduction, Instructions and Examples

A survey introduction helps participants decide whether to take part and understand how to respond. Explain the purpose, time and participation arrangements, then check that the wording matches the working form. A thesis survey introduction should explain who is conducting the study, whom it invites, what the questions concern, how long participation takes and what will happen to the responses. Participants also need instructions and information about voluntary participation and their data. A useful opening lets someone decide whether to take part before answering the first question. An anonymous online questionnaire for students needs a different opening from a study linking responses across two measurements. That difference must be visible in the wording. The four extended examples in this guide cover both arrangements, separate contact collection and returning a paper questionnaire. You can use their structure, but statements about data and timing must match your own study. An invitation is a recruitment message: a group post, email or short request sent to potential participants. It introduces the topic, identifies the intended group and leads to the questionnaire. For example: “Do you combine university study with paid work? You are invited to a study about organising your learning. Participation information and the questionnaire are available at the address provided.” That post does not replace the information in the form, because someone may forward only the link. The introduction belongs inside the questionnaire. It should remain available to everyone, wherever they found the invitation. It introduces the study and participation arrangements. A more complex project may also have a separate participant information sheet; the welcome screen does not necessarily contain every document. Instructions tell participants what to do: choose one option, select several, rate a statement or describe an experience. General instructions belong near the beginning, while exceptions are best placed beside the relevant question. “Select no more than three answers” should not be hidden several screens earlier. For the complete questionnaire-design process, use the guide to designing a research questionnaire. Here the focus is communication before the first question and its consistency with the actual study. The University of Warsaw's practical...

Read article