A step-by-step checklist for cleaning M&E data after collection. Duplicate detection, outlier identification, skip logic validation, consistency checks, and cleaning log documentation.
Key Takeaway
Never delete raw data. Document every change.
Work from a copy. Log what changed, why, by whom, and when. Raw data must stay intact for re-analysis and audit.
Before You Start
Clean M&E data in sequence: back up the raw file and work from a copy, remove duplicates, check completeness, validate skip logic, then handle outliers. Never delete or edit raw data. Log what changed, why, by whom and when, so the dataset can be re-analysed or audited later.
Who This Page Is For
You have finished data collection. The raw export is sitting in your downloads folder. Before you open it and start making charts, you need to clean it. Dirty data produces wrong findings, and wrong findings produce bad decisions.
This page is a step-by-step protocol for cleaning M&E datasets after collection. It covers household surveys, facility assessments, monitoring forms, and any structured data you collect in the field. Follow the steps in order. Skip nothing.
Before You Start
You need three things before you touch a single cell:
- Your Raw Data Export. Download it from KoboToolbox, SurveyCTO, ODK, or whatever platform you used. Export as XLSX or CSV. Do not edit it in the platform's online editor, because edits there change the original and leave no record.
- Your Codebook. This is the document that defines every variable, its expected values, skip logic rules, and valid ranges. If you do not have a codebook, your survey design process skipped a step. Build one now before cleaning.
- A Cleaning Log Template. A spreadsheet with one row per change. Every edit you make goes here. No exceptions. Use these columns:
| Column | What to Enter |
|---|---|
| Record ID | The respondent or household ID |
| Variable and values | The variable name, the original value and the new value |
| Reason | The rule you applied |
| Date and who | The date and the person who made the change |
One filled row to copy: HH-0231 | age: 250 became 25 | Typing error confirmed on the paper form | 2026-04-02, A. Mensah.
Cleaning is quicker when your survey form already blocked impossible answers while people typed them in. If you skipped those entry rules during survey design, expect to spend significantly more time here.
Three Rules That Hold Through Every Step
Cleaning means finding errors in a dataset and correcting them by documented rules. The key word is documented. Three rules cover most of what goes wrong.
- Never overwrite raw data. Save every cleaned dataset as a separate file. The raw file is the record of what was collected, and you may need to trace any value back to it.
- Log every correction. The cleaning log records the record ID, the variable, the original value, the new value, the reason for the change (the rule applied), the date and who made the change. Without it, cleaned data cannot be audited.
- Set the rules before you start. Write each rule down first, then apply it the same way to every record. Deciding case by case as you go lets judgment drift.
Here is the difference. "Values above the 99th percentile (the value that 99 out of 100 records fall below) are reviewed one by one and corrected only if a transcription error can be confirmed" is a rule. Two people applying it to the same file reach the same result, and the log shows why each value changed. "We will fix values that look wrong" is not a rule. Each person fixes different values, and nobody can later say why.
The steps below put these three rules to work in order.
Backup & Triage (Steps 1-3)
Step 1: Back Up and Set Up Your Workspace
Never clean data in the original file. Ever.
- Save the raw export to a folder named
raw/or01_raw/. This file is read-only from this point forward. Do not edit it. - Create a copy in a folder named
clean/or02_clean/. All edits happen in this copy. - Open your cleaning log. You will update it continuously as you work through the steps below.
- Record the date, the raw file name, the number of records, and the number of variables. This is your starting point.
Name your files with dates: household_survey_raw_20260401.xlsx and household_survey_clean_20260401.xlsx. When someone asks "which version did you analyze?" you need to answer precisely.
Step 2: Detect and Remove Duplicates
Duplicates happen more often than you think. Enumerators resubmit forms, connectivity issues cause double uploads, and copy-paste errors create phantom records.
How to check:
- In Excel, put
=COUNTIF($A:$A,A2)in a new column next to the ID column (A) and copy it down. Any row showing 2 or more shares its ID with another row; filter for those. Then sort by unique ID (respondent ID, household ID, or submission ID, the unique code the platform gives each submitted form). Look for exact matches. - If you have no unique ID, sort by a combination of location, date, and respondent name. Flag records that match on all three.
- Check submission timestamps. Two records uploaded within 60 seconds may be separate offline interviews synchronized together. Compare interview times, IDs, roster relationships, and responses before flagging a possible duplicate.
Decision rule: Treat matching IDs or responses as duplicate candidates. Establish whether they are resubmissions, legitimate repeat visits, or ID collisions (two different people given the same ID) using provenance (where each record came from: which device, enumerator and upload time) and the case definition (what counts as one case in each survey round). Preserve both source records, document which one you will use in the analysis, and flag exclusions rather than automatically deleting the later upload.
Step 3: Check Completeness
Every record should have values for required fields. Missing data is normal, but too much missing data makes a record unusable.
- Calculate the completion rate for each record: number of non-blank required fields divided by total required fields.
- Flag any record below 80% completion. A record missing a fifth or more of its required fields is suspect.
- For each flagged record, check the submission metadata. Was it a test submission? Did the enumerator abandon it mid-interview? Was the respondent unavailable after consent?
Decision rule: Do not impose a universal 50% completeness exclusion. Distinguish valid skips, refusals, unknowns, and unavailable values, then assess eligibility separately for each analysis. Records between 50-80% may be usable for some indicators but not others. Do not discard them automatically. Instead, mark them as partial and decide per-analysis which ones qualify.
Check for blank columns too. If an entire variable has zero responses, something went wrong with the form logic or the variable was never asked. Investigate before moving on.
Validation (Steps 4-6)
Step 4: Validate Skip Logic
Skip logic errors are the most common source of bad data in electronic surveys, and they are easy to miss if you do not check systematically.
Pull up your codebook. For every conditional question, verify:
- Records that should have skipped did skip. If question 12 only applies to respondents who answered "Yes" to question 10, check that all "No" respondents on question 10 have blank or "N/A" values on question 12.
- Records that should have answered did answer. If a respondent answered "Yes" to question 10 but question 12 is blank, that is a data gap, not a valid skip.
How to do this efficiently: Write simple filter rules. In Excel: filter column Q10 to "No," then check that column Q12 is blank for all filtered rows. In R or Stata (statistics software), this is a one-line logical check per skip pattern. In Excel, add a helper column with a formula such as =IF(AND(Q10="No",Q12<>""),"CHECK","") and filter for CHECK.
Decision rule: Investigate conflicts between screening and follow-up answers, including form-version errors, before deciding which value is valid. Preserve source values and record any derived exclusion or correction; do not silently blank responses. If a respondent skipped questions they should have answered, flag the record for review but do not fabricate data.
Working from paper forms. If enumerators fill in paper forms, do the same checks on the paper before data entry. Circle contradictory answers in red pen, initial next to a required field left empty, and never erase or write over the original answer. Write "N/A" only where the question was correctly skipped; leave a skipped-by-mistake answer blank and note it. Enter paper data into your spreadsheet exactly as written, then follow the steps on this page.
When handwriting is hard to read. Have a second person enter a sample of about 1 form in 10 and compare the two entries. If a digit or letter is unclear (is it a 5 or an S?), do not guess. Enter what you can read, mark the cell for review and write the form number and the doubt in the cleaning log. Ask the enumerator what they meant only if that is permitted and the memory is recent; if the answer is still unclear, leave the value blank and log it. Photograph or scan damaged forms before they are stored, and keep the photograph with the paper original.
Step 5: Check Ranges and Flag Outliers
Every numeric variable has a plausible range. An age of 250 is outside a plausible human-age range; a household with 47 members or monthly income of $1 may be real. Check units, definitions, and evidence before classifying a value as an error.
- For each numeric variable, define the valid range from your codebook. Separate hard impossibilities from review flags. Child-headed households, adults over 99, and large households may be eligible; numeric screening ranges must follow the actual instrument and population.
- Calculate basic descriptive statistics: minimum, maximum, mean, median, standard deviation.
- Flag any value outside the valid range as an error.
- Flag any value more than 3 standard deviations from the mean as a potential outlier for review. (A standard deviation measures how far values typically sit from the average. A value 3 or more away is unusual, but not always wrong.)
Common decision rules you can copy:
| Check | Flag Rule |
|---|---|
| Survey duration | Less than 5 minutes for a 30-minute survey: flag for review |
| GPS coordinates | More than 50 km from the expected survey area: flag |
| Age | Outside 0-120: error. Under 15 for head of household: flag |
| Household size | Over 20: flag for review |
| Income/expenditure | Zero for all categories: flag. Top 1%: verify |
Do not automatically delete outliers. Some are real. A household with 15 members exists. An income of $0 might be accurate for an extremely vulnerable household. Flag, investigate, then decide.
Step 6: Run Consistency Checks
Consistency checks catch logical contradictions that range checks miss. These require cross-referencing two or more variables.
Examples of consistency checks:
- A respondent reports 0 children but later reports school enrollment for 3 children.
- A respondent's reported age is 12 but their occupation is "teacher."
- A household reports no agricultural land but later reports crop harvest quantities.
- Date of birth and reported age differ by more than 1 year.
- A facility reports 0 staff but also reports service delivery numbers.
Build a list of 10-15 consistency checks specific to your survey. Run each one as a logical test. Flag contradictions for manual review.
Decision rule: Do not guess which answer is correct. If two variables contradict each other, you cannot determine which one is wrong from the data alone. Flag the record, and recontact only when authorized, safe, and permitted by the consent and approved protocol. If you cannot, document the contradiction and exclude the conflicting variables (not the entire record) from relevant analyses.
Sign-off (Steps 7-8)
Step 7: Document Everything in Your Cleaning Log
Your cleaning log is not optional. It is a data quality assurance requirement and an audit trail.
By the time you finish Steps 2 through 6, your log should contain every change you made. Review it now for completeness:
- Every excluded duplicate has an entry.
- Every corrected value shows the original and the new value.
- Every excluded record has a reason.
- Every flagged outlier has a final decision recorded (corrected, verified as accurate, or excluded).
Save the cleaning log alongside the cleaned dataset. Anyone who uses your data should be able to open the log and understand exactly what was changed and why. This is fundamental to good data management.
Step 8: Final Verification
Before you declare the dataset clean, run a final round of checks.
Recount Records. Compare your cleaned dataset count to the raw count. The difference should exactly match the number of records you excluded or deleted, as documented in your cleaning log.
Rerun Range Checks. Verify that no out-of-range values remain.
Rerun Skip Logic Checks. Confirm all skip patterns are now consistent.
Spot-Check 10-20 Records Manually. Open the raw file and the clean file side by side. Pick records at random. Verify the changes match your log.
Run a DQA to get a structured quality assessment of your cleaned dataset.
If everything checks out, rename your file to indicate it is final: household_survey_clean_FINAL_20260401.xlsx. Lock the file or set it to read-only.
If cleaning keeps turning up the same errors from the same sources, the fault is in the data system, not the file. A site visit with the DQA field checklist is the next step.
Mistakes & Checklist
Common Mistakes
Mistake 1: Cleaning in the original file. Once you overwrite raw data, it is gone. Every cleaning decision becomes irreversible and unverifiable. Always work in a copy. Always keep the raw export untouched.
Mistake 2: Deleting records instead of flagging them. Deleting a record removes it from every possible analysis, including ones you have not thought of yet. Flag and exclude instead. Let the analyst decide which records qualify for each specific analysis.
Mistake 3: No cleaning log. If you cannot explain what you changed and why, your cleaned dataset is not trustworthy. When a donor audits your data or a colleague questions a finding, "I cleaned it but didn't document the changes" is not an acceptable answer.
Mistake 4: Cleaning alone. Data cleaning involves judgment calls. A second person should review your flagged records and your decisions about outliers. If your team has only one data person, at minimum have the M&E manager review the cleaning log before analysis begins.
Mistake 5: Treating cleaning as optional. Teams skip cleaning when deadlines are tight, then discover problems during analysis when it is too late to fix them. Budget cleaning time into your workplan from the start. For a baseline or endline survey, plan for 1-3 days of cleaning per 500 responses.
If cleaning keeps finding the same faults, a structured data quality assessment can trace them to their source.
Cleaning Checklist
Print this or copy it into your project folder. Check off each item as you complete it.
- Raw data exported and saved to read-only
raw/folder - Clean copy created in separate
clean/folder - Cleaning log template open with starting record count documented
- Duplicate candidates reviewed using provenance; source records preserved and analysis exclusions logged
- Missingness and valid skips distinguished; per-analysis eligibility documented without a universal completeness cutoff
- Skip logic validated for all conditional questions
- Valid ranges defined for all numeric variables
- Out-of-range values corrected or flagged
- Outliers reviewed (3+ standard deviations from the mean) and a final decision logged for each
- Consistency checks run (10-15 cross-variable logic tests)
- Contradictions flagged and resolved or documented
- Cleaning log reviewed for completeness
- Final record count reconciled against raw count and cleaning log
- Range and skip logic checks rerun on cleaned dataset
- 10-20 records spot-checked against raw data
- Cleaned file renamed with FINAL tag and locked
- Cleaning log saved alongside cleaned dataset
Frequently Asked Questions
How long does data cleaning take?
Plan for 1-3 days per 500 survey responses for a standard household survey. Complex surveys with many skip patterns take longer. Budget cleaning time into your data collection timeline from the start, not as an afterthought.
Should I delete or correct problematic records?
Never delete raw data. Create a cleaned copy and document every change in a cleaning log. If a record is unusable, flag it and exclude it from analysis, but keep the original. Your cleaning log should record what was changed, why, by whom, and when.
What tools should I use for data cleaning?
For most M&E teams: Excel or Google Sheets for small datasets (under 1,000 records), R or Stata for larger datasets or complex cleaning rules, and OpenRefine for deduplication and standardization. KoboToolbox and SurveyCTO both have built-in validation that catches some issues during collection, but you still need post-collection cleaning.