Excel Functions Mis-handle Text Criteria That Resemble Scientific Notation, for Example 00E2
Our take
Hello everybody,
I'm not an Excel or VBA professional, but I'm using it quite a bit for the last 10 years.
Today I ran into an issue I (think) I've never encountered before.
Before anybody complains, the following text has been written by ChatGPT based on all the information I collected in the last 2 hours.
I ran into a serious, hard-to-detect issue in Excel where the conditional aggregation functions (SUMIF/SUMIFS, COUNTIF/COUNTIFS, and likely the rest of the family such as AVERAGEIF/S) can return incorrect results when the criteria text contains an “E” pattern that resembles scientific notation (e.g., 00E2, 10359E2, 01E2, etc.).
Core problem
When a criterion looks like scientific notation, Excel appears to coerce the text criterion into a numeric interpretation during evaluation, which can cause unrelated text values to match and be included in sums/counts. This can happen even if the data column is formatted as Text and the values are intended to be treated as literal strings.
A classic example: a COUNTIF search for a serial like 10359E2 can incorrectly count values like 1035900 as matches, because Excel effectively interprets 10359E2 as a scientific-notation number and conflates it with a different-looking string. This behavior has been reported with text-formatted cells and leads to incorrect duplicate detection and conditional totals.
Why this is dangerous
This is not a “your data has spaces” issue. The scary part is:
- Your dataset can look perfectly clean.
- The column can be formatted as Text.
- A spot-check of matching rows may look correct.
- Yet your SUMIF/SUMIFS/COUNTIF/COUNTIFS totals can be wrong because Excel is internally applying numeric coercion to the criterion (and/or comparisons) when the string resembles scientific notation.
In large datasets, it’s extremely easy to miss. Unless you already know this behavior exists, it’s close to impossible to debug (especially when only a handful of codes trigger it).
Does this still happen in current Excel versions?
This scientific-notation coercion behavior is not limited to old Excel versions. There are recent reports (including Excel 365 / Microsoft 365 Apps) of Excel still forcing scientific-notation behavior and performing unwanted conversions even when columns are set to Text.
So this appears to be an ongoing behavior/bug class rather than something fixed in modern builds.
Solution/Ask
Is Microsoft aware of this specific IF-family criteria coercion problem (text that looks like scientific notation causing false matches)? It would be great to have:
- A documented note/warning for SUMIF/SUMIFS/COUNTIF/COUNTIFS criteria evaluation, or
- A fix so Text stays Text during criteria matching; no scientific-notation coercion.
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Excel keeps converting my product codes with E to scientific notation. How do I stop this permanently?I have a column of product codes that include letters and numbers, like 4E75, 2E100, 8E22. Every time I paste new data into this column, Excel automatically converts these codes into scientific notation (4E+75, 2E+100, etc.) and I lose the original text format. I have tried formatting the column as Text before pasting. I have also tried using the import wizard and setting the column as Text there. The problem happens again every time I open a new CSV or paste from another source. Is there a way to tell Excel to never interpret E as scientific notation globally or at least for a specific workbook? I am using Excel 365 on Windows. I know about the option to disable automatic data conversion in File > Options > Data, but I want to know if that actually works reliably for other people before I change it. submitted by /u/dududududuuim [link] [comments]
- How to stop Excel from changing decimals to scientific notation?I just got a new work laptop which uses Microsoft Office 365. I regularly pull in stock prices and currency foreign exchange conversion from Yahoo! Finance into CSV, which I then copy and paste values into my Excel spreadsheet. One of the items I pull from Yahoo! Finance is IDRSGD=X, which is basically converting Indonesian Rupiah (IDR) to Singapore Dollars (SGD). Now, say IDR 1 = SGD 0.000077 and it is shown as such in Yahoo! Finance. However, in the CSV, the number automatically becomes 7.7E-5. When I copied and pasted from the CSV to my Excel file, it stayed the same way, ie. 7.7E-5. I know they mean the same thing but it's ugly and it just stands out like a sore thumb against all my other data in my spreadsheet, which are nicely presented in decimals. How can I stop Excel from automatically converting this notation? I went to Options --> Data and unchecked the relevant boxes, but it didn't help. In Excel, even if I Format Cells --> Number to reflect decimals, it does not help either. Somehow the ugly scientific notation overrides the cell formatting. There are many cells in the data set showing scientific notation instead of decimals, and I cannot be going cell by cell. I never faced this problem with my previous Microsoft Office 2019. Can someone please help? submitted by /u/Traditional_Bell7883 [link] [comments]
- Excel seems to think cell isn't big enough so 2 digit number looks crazy, no adjustment fixes issueI have multiple sheets that add together to make a total on the first page. Easy. The numbers are small - 3, 5, 10, nothing big. On the totals sheet, all the two digit sums are wrapped so that they are very small. I do not have wrapped text on but when I DO wrap the text, it stops wrapping them BUT there's this giant space between the two digits like "1 0" for 10. I tried everything I could think of - rewriting the formula as a SUM function (rather than this sheet + this sheet + this sheet), making sure each cell is formatted as a number, running "text to column" on each column of data, switching the font, switching the font size, changing the column size manually, double clicking on the columns to have them auto size, turning off shrink to fit, turning on shrink to fit again after, playing with the alignment.... Does anyone know what is going on and how I can solve it? Adding images (w/ some edits for privacy for my company). Will include the formulas (both versions). https://preview.redd.it/6n05pqeer4og1.png?width=1654&format=png&auto=webp&s=64729e1558bfba595d7d043b18d777b3e33e4ecf https://preview.redd.it/ydydstbfr4og1.png?width=1664&format=png&auto=webp&s=27e3d7cd18c2c380a5cf1a48853060a4bcd17c7c https://preview.redd.it/7dcraf9gr4og1.png?width=1106&format=png&auto=webp&s=4c93c635fbc20762a18cc8e137b6a40ee37c470e submitted by /u/catincombatboots [link] [comments]
- Excel formula automatically rewriting itself??Hi all, this is a really odd problem to run into and I am unsure how to proceed from here. I am currently entering data and I have Excel performing an =SUM(B5:AC5) for my data that is being entered. Because the data entry can go pretty fast sometimes, I would keep entering data past AC5 before I realize what happened. When I look at my SUM column, Excel has flagged my =SUM(B5:AC5) formula with the error below, which is fine and whatever, but it is automatically changing my =SUM(B5:AC5) formula to =SUM(B5:AF5) or something of similar depending on what column I stopped at. Just for reference, data from AD5 to AO5 is being summed up in another column with SUM=(AD5:AO5). Formula error being flagged by Excel I have no idea why it is doing this and I tried to ignore error, but it still automatically rewriting my formula anyways! This worksheet and formula worked smoothly 4 months ago so I don't know what is going on. submitted by /u/WildKhanine [link] [comments]