<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SheetError]]></title><description><![CDATA[SheetError]]></description><link>https://sheeterror.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 29 Oct 2026 20:23:25 GMT</lastBuildDate><atom:link href="https://sheeterror.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[VLOOKUP returns #N/A but the value is right there: numbers stored as text and trailing spaces]]></title><description><![CDATA[You can see the key in the table, and VLOOKUP(..., FALSE) still says #N/A. That's almost never a missing row. Exact match compares values, not what the…]]></description><link>https://sheeterror.hashnode.dev/vlookup-returns-n-a-but-the-value-is-right-there-numbers-stored-as-text-and-trailing-spaces</link><guid isPermaLink="true">https://sheeterror.hashnode.dev/vlookup-returns-n-a-but-the-value-is-right-there-numbers-stored-as-text-and-trailing-spaces</guid><category><![CDATA[google sheets]]></category><category><![CDATA[spreadsheets]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[SheetError]]></dc:creator><pubDate>Thu, 29 Oct 2026 00:06:33 GMT</pubDate><content:encoded><![CDATA[<p>You can <em>see</em> the key in the table, and <code>VLOOKUP(..., FALSE)</code> still says <strong>#N/A</strong>. That's almost never a missing row. Exact match compares <strong>values</strong>, not what the cell looks like. The two usual culprits are a number vs text mismatch, and a trailing space.</p>
<h2>Recreate both</h2>
<table>
<thead>
<tr>
<th></th>
<th>A (sku)</th>
<th>B (name)</th>
<th>D (lookup)</th>
<th>E</th>
</tr>
</thead>
<tbody><tr>
<td>2</td>
<td>101 <em>(number)</em></td>
<td>Widget</td>
<td><code>'101</code> <em>(text)</em></td>
<td><code>=VLOOKUP(D2,A2:B2,2,FALSE)</code> → <strong>#N/A</strong></td>
</tr>
<tr>
<td>3</td>
<td><code>apple </code> <em>(trailing space)</em></td>
<td>Fruit</td>
<td>apple</td>
<td><code>=VLOOKUP(D3,A3:B3,2,FALSE)</code> → <strong>#N/A</strong></td>
</tr>
</tbody></table>
<h2>Check the keys instead of guessing</h2>
<pre><code>=ISNUMBER(A2)   → TRUE
=ISTEXT(D2)     → TRUE     same digits, different types
=LEN(A3)        → 6
=LEN(D3)        → 5        same word, different lengths
</code></pre>
<p>Alignment is a hint (text left, numbers right), but ISNUMBER/ISTEXT and LEN are the proof.</p>
<p>A quick confirmation trick: retype D2 as a plain number (no apostrophe). E2 becomes <em>Widget</em>. Put the apostrophe back and #N/A returns. That toggle tells you it's a type problem, not a missing row.</p>
<h2>The trap: TRIM on the wrong side</h2>
<pre><code>=VLOOKUP(TRIM(D3),A3:B3,2,FALSE)   → still #N/A
</code></pre>
<p>The extra space lives in the <strong>table</strong>, not in the lookup value. Trimming D3 can't remove it.</p>
<h2>Fixes</h2>
<p><strong>Number vs text</strong> – convert the side that's wrong:</p>
<pre><code>=VLOOKUP(VALUE(D2),A2:B2,2,FALSE)   → Widget
</code></pre>
<p>If instead the <em>table</em> holds text and your lookup is a number, convert the lookup with <code>TO_TEXT(D2)</code> (or clean the table column). Don't wrap both sides and hope.</p>
<p><strong>Space in the table</strong> – trim the table side:</p>
<pre><code>=VLOOKUP(D3,ARRAYFORMULA({TRIM(A3:A),B3:B}),2,FALSE)
</code></pre>
<p>For real data, a cleaned helper column is easier to maintain. (In locales that use <code>;</code> as the argument separator, the comma between columns inside <code>{ }</code> becomes a backslash: <code>{TRIM(A3:A)\B3:B}</code>.)</p>
<p><strong>Still missing after TRIM?</strong> Check <code>LEN</code> again: Google's TRIM doesn't remove a non-breaking space, <code>CHAR(160)</code> (common in data pasted from the web). Turn it into a normal space first: <code>TRIM(SUBSTITUTE(A3,CHAR(160)," "))</code>.</p>
<h2>Don't reach for IFNA yet</h2>
<p><code>IFNA(VLOOKUP(...),"")</code> is fine for keys that really aren't there. When the row <em>should</em> match, hiding the #N/A just hides the type bug. Fix the keys first, then add IFNA for true misses.</p>
<hr />
<p><em>Originally published on <a href="https://sheeterror.com/tutorials/vlookup-na/">SheetError</a>, a free library of Google Sheets error fixes (I run it).</em></p>
<p><em>This article was created with the help of AI.</em></p>
]]></content:encoded></item><item><title><![CDATA[Fix "Function ADD parameter 2 expects number values" (#VALUE!) in Google Sheets]]></title><description><![CDATA[You type =A2+B2, and instead of a total the cell shows #VALUE!. Hover it and the tooltip says: Function ADD parameter 2 expects number values. But 'pcs' is…]]></description><link>https://sheeterror.hashnode.dev/fix-function-add-parameter-2-expects-number-values-value-in-google-sheets</link><guid isPermaLink="true">https://sheeterror.hashnode.dev/fix-function-add-parameter-2-expects-number-values-value-in-google-sheets</guid><category><![CDATA[google sheets]]></category><category><![CDATA[spreadsheets]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[SheetError]]></dc:creator><pubDate>Wed, 28 Oct 2026 00:09:11 GMT</pubDate><content:encoded><![CDATA[<p>You type <code>=A2+B2</code>, and instead of a total the cell shows <strong>#VALUE!</strong>. Hover it and the tooltip says:</p>
<blockquote>
<p>Function ADD parameter 2 expects number values. But 'pcs' is a text and cannot be coerced to a number.</p>
</blockquote>
<p>The formula parsed and the function name is fine. Sheets wanted a number and got <strong>text it can't turn into a number</strong>. Here's how to reproduce it, how to tell it apart from look-alike errors, and three fixes that don't involve IFERROR.</p>
<h2>Reproduce it in 30 seconds</h2>
<table>
<thead>
<tr>
<th></th>
<th>A (qty)</th>
<th>B (unit)</th>
<th>C</th>
</tr>
</thead>
<tbody><tr>
<td>2</td>
<td>10</td>
<td>pcs</td>
<td><code>=A2+B2</code> → <strong>#VALUE!</strong></td>
</tr>
<tr>
<td>3</td>
<td>10</td>
<td>2</td>
<td><code>=A3+B3</code> → 12</td>
</tr>
</tbody></table>
<p>Same operator, different input type. Two more ways to hit the same error:</p>
<ul>
<li><code>=VALUE("pcs")</code> → #VALUE! (VALUE only converts text that already looks like a number, date or time)</li>
<li><code>=DATEVALUE("Widget")</code> → #VALUE!</li>
</ul>
<p>And the case that surprises people: type <code>'10</code> (apostrophe, so it's text) in G2, then enter <code>=G2+1</code> in G3. You get <strong>11</strong>. Arithmetic <em>will</em> coerce a text number like <code>'10</code>. It will not coerce <code>pcs</code>. That is the whole difference between C2 failing and G3 working.</p>
<h2>Why SUM doesn't complain but + does</h2>
<p><code>=SUM(A2:B2)</code> returns <strong>10</strong>, not an error. SUM skips text silently. The <code>+</code> operator doesn't. So if a total is "too low" with SUM and errors with <code>+</code>, you have the same root cause: a text cell in a numeric column.</p>
<h2>It is not one of these</h2>
<ul>
<li><strong>#N/A</strong> is a lookup/filter miss. Nothing is being looked up here.</li>
<li><strong>#NAME?</strong> is an unknown function name (<code>VLOKUP</code>). Nothing is misspelled here; the + operator (ADD) rejected its argument.</li>
<li><strong>#ERROR! / Formula parse error</strong> means the formula couldn't be read at all (a missing bracket or quote, or commas vs semicolons for your locale). This formula parsed.</li>
<li><strong>#NUM!</strong> is a number outside a function's domain (e.g. <code>SQRT(-1)</code>). Here the type was wrong before the domain mattered.</li>
</ul>
<h2>Fixes</h2>
<p><strong>1. Keep units out of the math.</strong> The quantity column holds numbers only. Put the unit in the header, or add it after the calculation:</p>
<pre><code class="language-plaintext">=A2&amp;" pcs"      → "10 pcs" (text, for display only)
</code></pre>
<p><strong>2. Convert only real text numbers.</strong></p>
<pre><code class="language-plaintext">=VALUE(G2)                                   → 10 when G2 is '10
=VALUE(REGEXEXTRACT(SUBSTITUTE("1,200.5 pcs",",",""),"[0-9]+(?:\.[0-9]+)?"))   → 1200.5, keeps decimals and drops thousands commas
</code></pre>
<p>The regex takes only the first number, and signs or leading-dot decimals are read wrong without an error (-3.5 becomes 3.5, .5 becomes 5). On comma-decimal locales, swap the separators; see <a href="https://sheeterror.com/tutorials/formula-parse-locale/">https://sheeterror.com/tutorials/formula-parse-locale/</a> .</p>
<p>Don't wrap every #VALUE! in VALUE and hope; <code>VALUE("pcs")</code> still fails.</p>
<p><strong>3. Guard the type when a column may legitimately hold text</strong> (n/a, pending…):</p>
<pre><code class="language-plaintext">=IF(ISNUMBER(B2), A2+B2, "")
</code></pre>
<h2>Why not IFERROR?</h2>
<p><code>IFERROR(A2+B2, 0)</code> makes the cell look fine, but it also hides #REF! and #DIV/0! if the formula breaks differently later, and it turns "someone typed pcs in the qty column" into a silent wrong total. Fix the input or test the type with ISNUMBER.</p>
<hr />
<p><em>Originally published on</em> <a href="https://sheeterror.com/tutorials/value-error/"><em>SheetError</em></a><em>, a free library of Google Sheets error fixes (I run it). There's also a 76-second video walkthrough on the</em> <a href="https://www.youtube.com/@sheeterror"><em>SheetError YouTube channel</em></a><em>.</em></p>
<p><em>This article was created with the help of AI.</em></p>
]]></content:encoded></item></channel></rss>