1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski
3*b1cdbd2cSJim Jagielski
4*b1cdbd2cSJim Jagielski
5*b1cdbd2cSJim Jagielski<!--***********************************************************
6*b1cdbd2cSJim Jagielski *
7*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
8*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
9*b1cdbd2cSJim Jagielski * distributed with this work for additional information
10*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
11*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
12*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
13*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
14*b1cdbd2cSJim Jagielski *
15*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
16*b1cdbd2cSJim Jagielski *
17*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
18*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
19*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
21*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
22*b1cdbd2cSJim Jagielski * under the License.
23*b1cdbd2cSJim Jagielski *
24*b1cdbd2cSJim Jagielski ***********************************************************-->
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski
29*b1cdbd2cSJim Jagielski		<helpdocument version="1.0">
30*b1cdbd2cSJim Jagielski<meta>
31*b1cdbd2cSJim Jagielski<topic id="textscalc05empty_cellsxml" indexer="include" status="PUBLISH">
32*b1cdbd2cSJim Jagielski<title id="tit" xml-lang="en-US">Handling of Empty Cells</title>
33*b1cdbd2cSJim Jagielski<filename>/text/scalc/05/empty_cells.xhp</filename>
34*b1cdbd2cSJim Jagielski</topic>
35*b1cdbd2cSJim Jagielski</meta>
36*b1cdbd2cSJim Jagielski<body>
37*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id3146799"><bookmark_value>empty cells;handling of</bookmark_value>
38*b1cdbd2cSJim Jagielski</bookmark><comment>i86303</comment><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>
39*b1cdbd2cSJim Jagielski</variable></paragraph>
40*b1cdbd2cSJim Jagielski
41*b1cdbd2cSJim Jagielski<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>
42*b1cdbd2cSJim Jagielski<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>
43*b1cdbd2cSJim Jagielski<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>
44*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id8277230" xml-lang="en-US" l10n="NEW">A1: 1 B1: &lt;empty&gt; C1: =B1 (displays 0)</paragraph>
45*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4086428" xml-lang="en-US" l10n="NEW">=B1=0 =&gt; TRUE</paragraph>
46*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id9024628" xml-lang="en-US" l10n="NEW">=B1="" =&gt; TRUE</paragraph>
47*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id3067110" xml-lang="en-US" l10n="NEW">=C1=0 =&gt; TRUE</paragraph>
48*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id8841822" xml-lang="en-US" l10n="NEW">=C1="" =&gt; TRUE (previously was FALSE)</paragraph>
49*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4077578" xml-lang="en-US" l10n="NEW">=ISNUMBER(B1) =&gt; FALSE</paragraph>
50*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id9094515" xml-lang="en-US" l10n="NEW">=ISNUMBER(C1) =&gt; FALSE (previously was TRUE)</paragraph>
51*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id396740" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(1;A1:C1;2)) =&gt; FALSE (B1)</paragraph>
52*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id3859675" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(1;A1:C1;3)) =&gt; FALSE (C1, previously was TRUE)</paragraph>
53*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id402233" xml-lang="en-US" l10n="NEW">=ISTEXT(B1) =&gt; FALSE</paragraph>
54*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id1623889" xml-lang="en-US" l10n="NEW">=ISTEXT(C1) =&gt; FALSE</paragraph>
55*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id7781914" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(1;A1:C1;2)) =&gt; FALSE (B1, previously was TRUE)</paragraph>
56*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id300912" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(1;A1:C1;3)) =&gt; FALSE (C1)</paragraph>
57*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id9534592" xml-lang="en-US" l10n="NEW">=ISBLANK(B1) =&gt; TRUE</paragraph>
58*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4969328" xml-lang="en-US" l10n="NEW">=ISBLANK(C1) =&gt; FALSE</paragraph>
59*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id9635914" xml-lang="en-US" l10n="NEW">=ISBLANK(VLOOKUP(1;A1:C1;2)) =&gt; TRUE (B1, previously was FALSE)</paragraph>
60*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id2476577" xml-lang="en-US" l10n="NEW">=ISBLANK(VLOOKUP(1;A1:C1;3)) =&gt; FALSE (C1)</paragraph>
61*b1cdbd2cSJim Jagielski<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>
62*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id2629474" xml-lang="en-US" l10n="NEW">A1: &lt;empty&gt;</paragraph>
63*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id8069704" xml-lang="en-US" l10n="NEW">B1: =A1 =&gt; displays 0, but is just a reference to an empty cell</paragraph>
64*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4524674" xml-lang="en-US" l10n="NEW">=ISNUMBER(A1) =&gt; FALSE</paragraph>
65*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4396801" xml-lang="en-US" l10n="NEW">=ISTEXT(A1) =&gt; FALSE</paragraph>
66*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id5293740" xml-lang="en-US" l10n="NEW">=A1=0 =&gt; TRUE</paragraph>
67*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id7623828" xml-lang="en-US" l10n="NEW">=A1="" =&gt; TRUE</paragraph>
68*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id2861720" xml-lang="en-US" l10n="NEW">=ISNUMBER(B1) =&gt; FALSE (MS-Excel: TRUE)</paragraph>
69*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id9604480" xml-lang="en-US" l10n="NEW">=ISTEXT(B1) =&gt; FALSE</paragraph>
70*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id2298959" xml-lang="en-US" l10n="NEW">=B1=0 =&gt; TRUE</paragraph>
71*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4653767" xml-lang="en-US" l10n="NEW">=B1="" =&gt; TRUE (MS-Excel: FALSE)</paragraph>
72*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id8801538" xml-lang="en-US" l10n="NEW">C1: =VLOOKUP(...) with empty cell result =&gt; displays empty (MS-Excel: displays 0)</paragraph>
73*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id6746421" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(...)) =&gt; FALSE</paragraph>
74*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id4876247" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(...)) =&gt; FALSE</paragraph>
75*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id7458723" xml-lang="en-US" l10n="NEW">=ISNUMBER(C1) =&gt; FALSE (MS-Excel: TRUE)</paragraph>
76*b1cdbd2cSJim Jagielski<paragraph role="code" id="par_id2753379" xml-lang="en-US" l10n="NEW">=ISTEXT(C1) =&gt; FALSE</paragraph>
77*b1cdbd2cSJim Jagielski</body>
78*b1cdbd2cSJim Jagielski</helpdocument>
79