1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2*cdf0e10cSrcweir
3*cdf0e10cSrcweir
4*cdf0e10cSrcweir
5*cdf0e10cSrcweir<!--
6*cdf0e10cSrcweir ***********************************************************************
7*cdf0e10cSrcweir *
8*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9*cdf0e10cSrcweir *
10*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
11*cdf0e10cSrcweir *
12*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
13*cdf0e10cSrcweir *
14*cdf0e10cSrcweir * This file is part of OpenOffice.org.
15*cdf0e10cSrcweir *
16*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
17*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
18*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
19*cdf0e10cSrcweir *
20*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
21*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
22*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
24*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
27*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
28*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
29*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
30*cdf0e10cSrcweir *
31*cdf0e10cSrcweir ************************************************************************
32*cdf0e10cSrcweir -->
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir		<helpdocument version="1.0">
36*cdf0e10cSrcweir<meta>
37*cdf0e10cSrcweir<topic id="textscalc05empty_cellsxml" indexer="include" status="PUBLISH">
38*cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Handling of Empty Cells</title>
39*cdf0e10cSrcweir<filename>/text/scalc/05/empty_cells.xhp</filename>
40*cdf0e10cSrcweir</topic>
41*cdf0e10cSrcweir</meta>
42*cdf0e10cSrcweir<body>
43*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3146799"><bookmark_value>empty cells;handling of</bookmark_value>
44*cdf0e10cSrcweir</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>
45*cdf0e10cSrcweir</variable></paragraph>
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir<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>
48*cdf0e10cSrcweir<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>
49*cdf0e10cSrcweir<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>
50*cdf0e10cSrcweir<paragraph role="code" id="par_id8277230" xml-lang="en-US" l10n="NEW">A1: 1 B1: &lt;empty&gt; C1: =B1 (displays 0)</paragraph>
51*cdf0e10cSrcweir<paragraph role="code" id="par_id4086428" xml-lang="en-US" l10n="NEW">=B1=0 =&gt; TRUE</paragraph>
52*cdf0e10cSrcweir<paragraph role="code" id="par_id9024628" xml-lang="en-US" l10n="NEW">=B1="" =&gt; TRUE</paragraph>
53*cdf0e10cSrcweir<paragraph role="code" id="par_id3067110" xml-lang="en-US" l10n="NEW">=C1=0 =&gt; TRUE</paragraph>
54*cdf0e10cSrcweir<paragraph role="code" id="par_id8841822" xml-lang="en-US" l10n="NEW">=C1="" =&gt; TRUE (previously was FALSE)</paragraph>
55*cdf0e10cSrcweir<paragraph role="code" id="par_id4077578" xml-lang="en-US" l10n="NEW">=ISNUMBER(B1) =&gt; FALSE</paragraph>
56*cdf0e10cSrcweir<paragraph role="code" id="par_id9094515" xml-lang="en-US" l10n="NEW">=ISNUMBER(C1) =&gt; FALSE (previously was TRUE)</paragraph>
57*cdf0e10cSrcweir<paragraph role="code" id="par_id396740" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(1;A1:C1;2)) =&gt; FALSE (B1)</paragraph>
58*cdf0e10cSrcweir<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>
59*cdf0e10cSrcweir<paragraph role="code" id="par_id402233" xml-lang="en-US" l10n="NEW">=ISTEXT(B1) =&gt; FALSE</paragraph>
60*cdf0e10cSrcweir<paragraph role="code" id="par_id1623889" xml-lang="en-US" l10n="NEW">=ISTEXT(C1) =&gt; FALSE</paragraph>
61*cdf0e10cSrcweir<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>
62*cdf0e10cSrcweir<paragraph role="code" id="par_id300912" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(1;A1:C1;3)) =&gt; FALSE (C1)</paragraph>
63*cdf0e10cSrcweir<paragraph role="code" id="par_id9534592" xml-lang="en-US" l10n="NEW">=ISBLANK(B1) =&gt; TRUE</paragraph>
64*cdf0e10cSrcweir<paragraph role="code" id="par_id4969328" xml-lang="en-US" l10n="NEW">=ISBLANK(C1) =&gt; FALSE</paragraph>
65*cdf0e10cSrcweir<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>
66*cdf0e10cSrcweir<paragraph role="code" id="par_id2476577" xml-lang="en-US" l10n="NEW">=ISBLANK(VLOOKUP(1;A1:C1;3)) =&gt; FALSE (C1)</paragraph>
67*cdf0e10cSrcweir<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>
68*cdf0e10cSrcweir<paragraph role="code" id="par_id2629474" xml-lang="en-US" l10n="NEW">A1: &lt;empty&gt;</paragraph>
69*cdf0e10cSrcweir<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>
70*cdf0e10cSrcweir<paragraph role="code" id="par_id4524674" xml-lang="en-US" l10n="NEW">=ISNUMBER(A1) =&gt; FALSE</paragraph>
71*cdf0e10cSrcweir<paragraph role="code" id="par_id4396801" xml-lang="en-US" l10n="NEW">=ISTEXT(A1) =&gt; FALSE</paragraph>
72*cdf0e10cSrcweir<paragraph role="code" id="par_id5293740" xml-lang="en-US" l10n="NEW">=A1=0 =&gt; TRUE</paragraph>
73*cdf0e10cSrcweir<paragraph role="code" id="par_id7623828" xml-lang="en-US" l10n="NEW">=A1="" =&gt; TRUE</paragraph>
74*cdf0e10cSrcweir<paragraph role="code" id="par_id2861720" xml-lang="en-US" l10n="NEW">=ISNUMBER(B1) =&gt; FALSE (MS-Excel: TRUE)</paragraph>
75*cdf0e10cSrcweir<paragraph role="code" id="par_id9604480" xml-lang="en-US" l10n="NEW">=ISTEXT(B1) =&gt; FALSE</paragraph>
76*cdf0e10cSrcweir<paragraph role="code" id="par_id2298959" xml-lang="en-US" l10n="NEW">=B1=0 =&gt; TRUE</paragraph>
77*cdf0e10cSrcweir<paragraph role="code" id="par_id4653767" xml-lang="en-US" l10n="NEW">=B1="" =&gt; TRUE (MS-Excel: FALSE)</paragraph>
78*cdf0e10cSrcweir<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>
79*cdf0e10cSrcweir<paragraph role="code" id="par_id6746421" xml-lang="en-US" l10n="NEW">=ISNUMBER(VLOOKUP(...)) =&gt; FALSE</paragraph>
80*cdf0e10cSrcweir<paragraph role="code" id="par_id4876247" xml-lang="en-US" l10n="NEW">=ISTEXT(VLOOKUP(...)) =&gt; FALSE</paragraph>
81*cdf0e10cSrcweir<paragraph role="code" id="par_id7458723" xml-lang="en-US" l10n="NEW">=ISNUMBER(C1) =&gt; FALSE (MS-Excel: TRUE)</paragraph>
82*cdf0e10cSrcweir<paragraph role="code" id="par_id2753379" xml-lang="en-US" l10n="NEW">=ISTEXT(C1) =&gt; FALSE</paragraph>
83*cdf0e10cSrcweir</body>
84*cdf0e10cSrcweir</helpdocument>
85