Skip to content
OneKitly

The Number 1 and the Text "1" Are Not Duplicates

Published 9/1/2026 · 4 min read · File tools

Daniel Okonkwo

Daniel Okonkwo — Front-end developer and tech writer at OneKitly

Web performance · File formats

Checked against 3 sources

View profile →
In short

The tool keeps the first occurrence of every distinct row and drops the rest, comparing the full tuple of cells rather than any single key column — so two customers with the same name but different addresses both survive, which is what you want. What surprises people is that the comparison is exact and typed. Running it over five rows that all display as 1, a — the number 1, the text "1", the number again, the same number written 1.0, and the text " 1" with a leading space — leaves three: the number, the plain text and the spaced text are three different rows, while 1 and 1.0 are the same number and collapse. That is not a defect; it is the only comparison that cannot silently merge two records that differ. It does mean that a column imported as text from one file and as numbers from another will not deduplicate against itself, and the fix is upstream: make the column one type before you merge, not after.

Deduplication compares whole rows exactly, cell type included. Five identical-looking rows came out as three, because one held a number, one a string and one a string with a leading space.

Where the mixed types come from

Almost always from an import. A CSV has no types at all — every field is text until something decides otherwise — so the program that opened it guessed, and it guesses differently depending on the column's first rows, the locale and whether a value has a leading zero or a currency sign. Reference numbers are the usual casualty: 00412 is text in one file because the zero must be kept and the number 412 in another because it looked numeric. Merge those two and the same reference is two rows.

The other source is invisible whitespace. A trailing space survives a copy-paste from a web page, a PDF or an email, and it makes two otherwise identical cells different for every exact comparison — deduplication here, but also lookups, joins and pivot tables everywhere else. Cleaning it is a find-and-replace before the merge, and it is worth doing on any column you intend to match on.

Whole rows, not a key column

Comparing the whole row is the conservative choice and worth understanding as one. Two rows that agree on the reference number but differ in one address field are kept, because the tool cannot know which of the two addresses is current — deciding that is a judgement about your data, not an operation on it. If you want to deduplicate on a single column, sort by that column first and remove the extras yourself; the result is the same and the decision stays yours. The header row is never treated as a duplicate of anything, so a file whose first row repeats a value from the body keeps both.

Five rows that all display as 1, a — three survive
Cell as storedKept or droppedWhy
number 1KeptFirst occurrence
text "1"KeptA string is not a number
number 1 againDroppedSame as the first row
number 1.0DroppedThe same number written differently
text " 1" with a spaceKeptA different string
Remove duplicate rowsDelete rows that repeat an earlier row exactly, keeping the header and the first occurrence. Works with Excel (XLSX, XLS, XLSM, XLSB), OpenDocument (ODS), Apple Numbers, CSV and TSV.Try the tool →

Frequently asked questions

Which of the duplicates is kept?
The first one in the file, in the order the rows appear. Everything after it is dropped. If the rows differ in a column you did not think to look at, the one kept is the earliest, not the best — so if recency matters, sort the sheet before you deduplicate rather than after.
How do I make a mixed column one type?
Decide which type the column really is and convert the whole thing in one operation before merging. Reference numbers, postcodes and phone numbers are text — they have leading zeros and are never added up. Amounts and counts are numbers. In a spreadsheet, format the column, then use a text-to-columns pass or a helper column with TEXT or VALUE to force every cell across; formatting alone does not change what is stored.
Does it look across the sheets of a workbook?
It works on one sheet at a time, which is what you want when tabs hold different things. To deduplicate across several files or tabs, merge them into a single sheet first — the row merge stacks every file's rows into one table and keeps only the first header — and then run this on the result.

Articles you may find interesting

All guides →
ExplainerA Cell of Three Spaces Counts as Empty, and That Is the PointWhitespace is the whole reason these tools exist. A row of blanks looks empty, is not empty to a strict test, and quietly survives every filter you apply after it.How-toMerging Workbooks: One Sheet Each, or One Table for AllTwelve monthly reports can become twelve tabs or one table of twelve months. Only the second can be sorted and summed in one go — and it is the one where the header rows need handling.How-toOne File per Tab, and What a Split Leaves BehindSplitting a workbook writes one .xlsx per sheet, named after the tab. It carries the values across and not the formulas — which is the right default when the point is to send one department its own tab.ComparisonA Column Called "Total (EUR)" Cannot Be an XML Element NameJSON takes your header text as a key exactly as written. XML cannot — its names may not hold spaces, parentheses or a leading digit — so they are normalised, and knowing how prevents a surprise downstream.ExplainerThe .ods File That Is Valid, and That Your Reader RefusesOpenDocument makes styles.xml optional. Several readers demand it and reject the whole document without it — "Cannot find file styles.xml in zip" on a file that is not broken.ExplainerThe Workbook with Twenty-Three Formulas That Reported NoneA cell can hold a formula and no cached result. A reader that skips empty cells throws the formula away with them — and says the file has none. One parsing option separates the two cases.

Related tools

Sources

Spotted a mistake in this article?