1<?xml version="1.0" encoding="UTF-8"?> 2<helpdocument version="1.0"> 3 4<!-- 5 * This file is part of the LibreOffice project. 6 * 7 * This Source Code Form is subject to the terms of the Mozilla Public 8 * License, v. 2.0. If a copy of the MPL was not distributed with this 9 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 * 11 * This file incorporates work covered by the following license notice: 12 * 13 * Licensed to the Apache Software Foundation (ASF) under one or more 14 * contributor license agreements. See the NOTICE file distributed 15 * with this work for additional information regarding copyright 16 * ownership. The ASF licenses this file to you under the Apache 17 * License, Version 2.0 (the "License"); you may not use this file 18 * except in compliance with the License. You may obtain a copy of 19 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 20 --> 21 22 23<meta> 24 <topic id="textscalcguidecellstyle_minusvaluexml" indexer="include" status="PUBLISH"> 25 <title xml-lang="en-US" id="tit">Highlighting Negative Numbers</title> 26 <filename>/text/scalc/guide/cellstyle_minusvalue.xhp</filename> 27 </topic> 28 </meta> 29 <body> 30<bookmark xml-lang="en-US" branch="index" id="bm_id3147434"><bookmark_value>negative numbers</bookmark_value> 31 <bookmark_value>numbers; highlighting negative numbers</bookmark_value> 32 <bookmark_value>highlighting;negative numbers</bookmark_value> 33 <bookmark_value>colors;negative numbers</bookmark_value> 34 <bookmark_value>number formats;colors for negative numbers</bookmark_value> 35</bookmark><comment>MW made "negative numbers;" a one level entry</comment><comment>MW changed "numbers formats;" and "colors;"</comment> 36<paragraph xml-lang="en-US" id="hd_id3147434" role="heading" level="1"><variable id="cellstyle_minusvalue"><link href="text/scalc/guide/cellstyle_minusvalue.xhp" name="Highlighting Negative Numbers">Highlighting Negative Numbers</link> 37</variable></paragraph> 38 <paragraph xml-lang="en-US" id="par_id3153878" role="paragraph">You can format cells with a number format that highlights negative numbers in red. Alternatively, you can define your own number format in which negative numbers are highlighted in other colors.</paragraph> 39 <list type="ordered"> 40 <listitem> 41 <paragraph xml-lang="en-US" id="par_id3155600" role="listitem">Select the cells and choose <emph>Format - Cells</emph>.</paragraph> 42 </listitem> 43 <listitem> 44 <paragraph xml-lang="en-US" id="par_id3146969" role="listitem">On the <emph>Numbers</emph> tab, select a number format and mark <emph>Negative numbers red</emph> check box. Click <emph>OK</emph>.</paragraph> 45 </listitem> 46 </list> 47 <paragraph xml-lang="en-US" id="par_id3145640" role="paragraph">The cell number format is defined in two parts. The format for positive numbers and zero is defined in front of the semicolon; after the semicolon the formula for negative numbers is defined. You can change the code (RED) under <item type="menuitem">Format code</item>. For example, instead of RED, enter <item type="literal">YELLOW</item>. If the new code appears in the list after clicking the <item type="menuitem">Add</item> icon, this is a valid entry.</paragraph> 48 <section id="relatedtopics"> 49 <embed href="text/scalc/guide/cellstyle_conditional.xhp#cellstyle_conditional"/> 50 <embed href="text/scalc/guide/cellstyle_by_formula.xhp#cellstyle_by_formula"/> 51 </section> 52 </body> 53</helpdocument>