Fix Excel for the Web Duplicating Values in Merged Cells
Question details
The user needs to correct inflated counting formulas caused by data validation dropdown selections being written to all underlying cells of a merged range.

- Product
- Excel for the Web
- Device & OS
- not provided
- Scenario
- Using data validation dropdown lists inside merged cells within an Excel workbook hosted on SharePoint or Excel for the Web.
- Observed behavior
- When a value is selected from a data validation dropdown in a merged cell, Excel for the Web writes that value to every single underlying cell in the merged range. This causes formulas like COUNTIF to count the hidden duplicates, returning incorrect, inflated results.
Before attempting workarounds, verify if the issue persists by clicking 'Open in Desktop App', as this data validation duplication bug is typically isolated to the Excel for the Web environment.
Adjust the COUNTIF Formula to Account for Merged Cells
Modify your counting formula to divide the final result by the number of underlying cells in the merged range, neutralizing the duplicate counts.
Since the web version of Excel physically writes the dropdown value to all cells within the merge, a standard COUNTIF will count every instance. By dividing the COUNTIF result by a COUNTA of the columns in the merge, you can mathematically correct the total.
Locate the exact cell range of your merged cells (for example, Q11:S12) and the criterion cell you are trying to count (for example, Q15).
Click on the cell where your current COUNTIF formula is returning the inflated result.
Update the formula so it divides by the number of underlying columns in the merged row. Change =COUNTIF($Q$11:$S$12,Q15) to =COUNTIF($Q$11:$S$12,Q15)/COUNTA($Q$11:$S$11).
Press Enter to apply the new formula. Check the output to ensure the count now accurately reflects the intended number of selections.

Temporarily Unmerge and Remerge the Cells
If you only need to enter or change data occasionally, unmerging the cells prior to making a dropdown selection prevents the values from duplicating.
Report the Bug to Microsoft Support
Report this known web-specific behavior to the Microsoft 365 Admin Center to push for a permanent software patch.
Use WPS Office to Avoid Web Spreadsheet Bugs
Since data validation duplication is an inherent bug in Microsoft Excel for the Web, switching to the robust WPS Office desktop application can help you bypass these browser-based glitches. WPS Spreadsheet handles merged cells and data validation seamlessly, ensuring your counting formulas remain accurate.
- 1. Download and Install: Download WPS Office for free from the official website and install it on your device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet, click 'Open', and select your existing .xlsx file.
- 3. Edit Without Duplication: Use your data validation dropdowns in merged cells normally without the underlying values duplicating or breaking your formulas.

Frequently Asked Questions
Why does COUNTIF return wrong results on merged cells with data validation?
In Excel for the Web, a known glitch causes the selected dropdown value to be written into every single hidden underlying cell within the merged block. Because COUNTIF checks every cell in the defined range, it counts these hidden duplicate values, resulting in an artificially inflated total.
Does this merged cell duplication bug affect the Excel desktop app?
No, this specific duplication behavior is generally isolated to Excel for the Web (often accessed via SharePoint or OneDrive). Opening and editing the exact same workbook in the desktop version of Excel typically resolves the problem.
Can I use 'Center Across Selection' instead of merging cells?
Yes. Using 'Center Across Selection' via the Format Cells alignment dialog is highly recommended over 'Merge & Center'. It visually centers your text across multiple columns without physically merging the cells, entirely avoiding the data validation duplication bug.
Is there a permanent fix for this Excel for the Web issue?
Currently, there is no built-in permanent fix deployed by Microsoft for the web platform. Users must rely on formula adjustments (like dividing by COUNTA), unmerging cells, or using a desktop spreadsheet application like WPS Office.




