1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir 302dbb15cSAndrew Rist<!--*********************************************************** 495f9d078Smseidel * 502dbb15cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 602dbb15cSAndrew Rist * or more contributor license agreements. See the NOTICE file 702dbb15cSAndrew Rist * distributed with this work for additional information 802dbb15cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 902dbb15cSAndrew Rist * to you under the Apache License, Version 2.0 (the 1002dbb15cSAndrew Rist * "License"); you may not use this file except in compliance 1102dbb15cSAndrew Rist * with the License. You may obtain a copy of the License at 1295f9d078Smseidel * 1302dbb15cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 1495f9d078Smseidel * 1502dbb15cSAndrew Rist * Unless required by applicable law or agreed to in writing, 1602dbb15cSAndrew Rist * software distributed under the License is distributed on an 1702dbb15cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1802dbb15cSAndrew Rist * KIND, either express or implied. See the License for the 1902dbb15cSAndrew Rist * specific language governing permissions and limitations 2002dbb15cSAndrew Rist * under the License. 2195f9d078Smseidel * 2202dbb15cSAndrew Rist ***********************************************************--> 2302dbb15cSAndrew Rist 2495f9d078Smseidel<helpdocument version="1.0"> 25cdf0e10cSrcweir<meta> 26cdf0e10cSrcweir<topic id="textscalc05empty_cellsxml" indexer="include" status="PUBLISH"> 27cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Handling of Empty Cells</title> 28cdf0e10cSrcweir<filename>/text/scalc/05/empty_cells.xhp</filename> 29cdf0e10cSrcweir</topic> 30cdf0e10cSrcweir</meta> 31cdf0e10cSrcweir<body> 3282a98929Smseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3146799"> 3382a98929Smseidel<bookmark_value>empty cells;handling of</bookmark_value> 3482a98929Smseidel</bookmark><comment>i86303</comment> 3582a98929Smseidel<paragraph role="heading" id="hd_id1502121" xml-lang="en-US" level="1" l10n="NEW"><variable id="empty_cells"><link href="text/scalc/05/empty_cells.xhp">Handling of Empty Cells</link></variable></paragraph> 36f773ab65Smseidel<paragraph role="paragraph" id="par_id8266853" xml-lang="en-US" l10n="NEW">In older versions of the software, empty cells were forced to numeric 0 in some contexts and to empty string in others, except in direct comparison where =A1=0 and =A1="" both resulted in TRUE if A1 was empty. Emptiness now is inherited until used, so both =VLOOKUP(...)=0 and =VLOOKUP(...)="" give TRUE if the lookup resulted in an empty cell being returned.</paragraph> 37*d1b9f731Smseidel<paragraph role="paragraph" id="par_id2733542" xml-lang="en-US" l10n="NEW">A simple reference to an empty cell is still displayed as numeric 0 but is not necessarily of type numeric anymore, so also comparisons with the referencing cell work as expected.</paragraph> 38cdf0e10cSrcweir<paragraph role="paragraph" id="par_id4238715" xml-lang="en-US" l10n="NEW">For the following examples, A1 contains a number, B1 is empty, C1 contains the reference to B1:</paragraph> 39cdf0e10cSrcweir<paragraph role="code" id="par_id8277230" xml-lang="en-US" l10n="NEW">A1: 1 B1: <empty> C1: =B1 (displays 0)</paragraph> 40cdf0e10cSrcweir<paragraph role="code" id="par_id4086428" xml-lang="en-US" l10n="NEW">=B1=0 => TRUE</paragraph> 41cdf0e10cSrcweir<paragraph role="code" id="par_id9024628" xml-lang="en-US" l10n="NEW">=B1="" => TRUE</paragraph> 42cdf0e10cSrcweir<paragraph role="code" id="par_id3067110" xml-lang="en-US" l10n="NEW">=C1=0 => TRUE</paragraph> 43cdf0e10cSrcweir<paragraph role="code" id="par_id8841822" xml-lang="en-US" l10n="NEW">=C1="" => TRUE (previously was FALSE)</paragraph> 44cdf0e10cSrcweir<paragraph role="code" id="par_id4077578" xml-lang="en-US" l10n="NEW">=ISNUMBER(B1) => FALSE</paragraph> 45cdf0e10cSrcweir<paragraph role="code" id="par_id9094515" xml-lang="en-US" l10n="NEW">=ISNUMBER(C1) => FALSE (previously was TRUE)</paragraph> 46cdf0e10cSrcweir<paragraph role="code" id="par_id396740" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(1;A1:C1;2)) => FALSE (B1)</paragraph> 47cdf0e10cSrcweir<paragraph role="code" id="par_id3859675" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(1;A1:C1;3)) => FALSE (C1, previously was TRUE)</paragraph> 48cdf0e10cSrcweir<paragraph role="code" id="par_id402233" xml-lang="en-US" l10n="NEW">=ISTEXT(B1) => FALSE</paragraph> 49cdf0e10cSrcweir<paragraph role="code" id="par_id1623889" xml-lang="en-US" l10n="NEW">=ISTEXT(C1) => FALSE</paragraph> 50cdf0e10cSrcweir<paragraph role="code" id="par_id7781914" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(1;A1:C1;2)) => FALSE (B1, previously was TRUE)</paragraph> 51cdf0e10cSrcweir<paragraph role="code" id="par_id300912" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(1;A1:C1;3)) => FALSE (C1)</paragraph> 52cdf0e10cSrcweir<paragraph role="code" id="par_id9534592" xml-lang="en-US" l10n="NEW">=ISBLANK(B1) => TRUE</paragraph> 53cdf0e10cSrcweir<paragraph role="code" id="par_id4969328" xml-lang="en-US" l10n="NEW">=ISBLANK(C1) => FALSE</paragraph> 54cdf0e10cSrcweir<paragraph role="code" id="par_id9635914" xml-lang="en-US" l10n="NEW">=ISBLANK(VLOOKUP(1;A1:C1;2)) => TRUE (B1, previously was FALSE)</paragraph> 55cdf0e10cSrcweir<paragraph role="code" id="par_id2476577" xml-lang="en-US" l10n="NEW">=ISBLANK(VLOOKUP(1;A1:C1;3)) => FALSE (C1)</paragraph> 56cdf0e10cSrcweir<paragraph role="note" id="par_id4217047" xml-lang="en-US" l10n="NEW">Note that Microsoft Excel behaves different and always returns a number as the result of a reference to an empty cell or a formula cell with the result of an empty cell. For example:</paragraph> 57cdf0e10cSrcweir<paragraph role="code" id="par_id2629474" xml-lang="en-US" l10n="NEW">A1: <empty></paragraph> 58cdf0e10cSrcweir<paragraph role="code" id="par_id8069704" xml-lang="en-US" l10n="NEW">B1: =A1 => displays 0, but is just a reference to an empty cell</paragraph> 59cdf0e10cSrcweir<paragraph role="code" id="par_id4524674" xml-lang="en-US" l10n="NEW">=ISNUMBER(A1) => FALSE</paragraph> 60cdf0e10cSrcweir<paragraph role="code" id="par_id4396801" xml-lang="en-US" l10n="NEW">=ISTEXT(A1) => FALSE</paragraph> 61cdf0e10cSrcweir<paragraph role="code" id="par_id5293740" xml-lang="en-US" l10n="NEW">=A1=0 => TRUE</paragraph> 62cdf0e10cSrcweir<paragraph role="code" id="par_id7623828" xml-lang="en-US" l10n="NEW">=A1="" => TRUE</paragraph> 63cdf0e10cSrcweir<paragraph role="code" id="par_id2861720" xml-lang="en-US" l10n="NEW">=ISNUMBER(B1) => FALSE (MS-Excel: TRUE)</paragraph> 64cdf0e10cSrcweir<paragraph role="code" id="par_id9604480" xml-lang="en-US" l10n="NEW">=ISTEXT(B1) => FALSE</paragraph> 65cdf0e10cSrcweir<paragraph role="code" id="par_id2298959" xml-lang="en-US" l10n="NEW">=B1=0 => TRUE</paragraph> 66cdf0e10cSrcweir<paragraph role="code" id="par_id4653767" xml-lang="en-US" l10n="NEW">=B1="" => TRUE (MS-Excel: FALSE)</paragraph> 67cdf0e10cSrcweir<paragraph role="code" id="par_id8801538" xml-lang="en-US" l10n="NEW">C1: =VLOOKUP(...) with empty cell result => displays empty (MS-Excel: displays 0)</paragraph> 68cdf0e10cSrcweir<paragraph role="code" id="par_id6746421" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(...)) => FALSE</paragraph> 69cdf0e10cSrcweir<paragraph role="code" id="par_id4876247" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(...)) => FALSE</paragraph> 70cdf0e10cSrcweir<paragraph role="code" id="par_id7458723" xml-lang="en-US" l10n="NEW">=ISNUMBER(C1) => FALSE (MS-Excel: TRUE)</paragraph> 71cdf0e10cSrcweir<paragraph role="code" id="par_id2753379" xml-lang="en-US" l10n="NEW">=ISTEXT(C1) => FALSE</paragraph> 72cdf0e10cSrcweir</body> 73cdf0e10cSrcweir</helpdocument> 74