| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/LibreOffice/help/en-US/text/scalc/guide/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Entering a Number with Leading Zeros</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="bm_id3147560"></a>
<meta itemprop="keywords" content="zero values, entering leading zeros">
<meta itemprop="keywords" content="numbers, with leading zeros">
<meta itemprop="keywords" content="leading zeros">
<meta itemprop="keywords" content="integers with leading zeros">
<meta itemprop="keywords" content="cells, changing text/number formats">
<meta itemprop="keywords" content="formats, changing text/number">
<meta itemprop="keywords" content="text in cells, changing to numbers">
<meta itemprop="keywords" content="converting,text with leading zeros, into numbers">
<h1 id="hd_id3147560" dir="auto">
<a name="integer_leading_zero"></a>Entering a Number with Leading Zeros</h1>
<a name="inttext"></a>
<p id="par_id3153194" class="paragraph" dir="auto">There are various ways to enter integers starting with a zero:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id3146119" class="listitem" dir="auto">Enter the number as text. The easiest way is to enter the number starting with an apostrophe (for example, <span class="input" data-tooltip="Click on text to copy to clipboard">'0987</span>). The apostrophe will not appear in the cell, and the number will be formatted as text. Because it is in text format, however, you cannot calculate with this number.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id3154013" class="listitem" dir="auto">Format a cell with a number format such as <span class="input" data-tooltip="Click on text to copy to clipboard">\0000</span>. This format can be assigned in the <span class="emph">Format code</span> field under the <span class="emph">Format - Cells - Numbers</span> tab, and defines the cell display as "always put a zero first and then the integer, having at least three places, and filled with zeros at the left if less than three digits".</p>
</li>
</ul>
<p id="par_id3150011" class="paragraph" dir="auto"></p>
<p id="par_id3153158" class="paragraph" dir="auto">If you want to apply a numerical format to a column of numbers in text format (for example, text "000123" becomes number "123"), do the following:</p>
<ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3149377" class="listitem" dir="auto">Select the column in which the digits are found in text format. Set the cell format in that column as "Number".</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3154944" class="listitem" dir="auto">Choose <span class="emph">Edit - Find & Replace</span></p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3154510" class="listitem" dir="auto">In the <span class="emph">Find</span> box, enter <span class="input" data-tooltip="Click on text to copy to clipboard">^[0-9]</span></p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3155068" class="listitem" dir="auto">In the <span class="emph">Replace</span> box, enter <span class="input">&</span></p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3149018" class="listitem" dir="auto">Check <span class="emph">Regular expressions</span></p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3156382" class="listitem" dir="auto">Check <span class="emph">Current selection only</span></p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3146916" class="listitem" dir="auto">Click <span class="emph">Replace All</span></p>
</li>
</ol>
<a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
<div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/scalc/guide/text_numbers.html">Formatting Numbers as Text</a>
</p></div>
<div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/scalc/guide/format_value.html">Formatting Numbers With Decimals</a>
</p></div>
</div>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/scalc/guide/integer_leading_zero.xhp" target="_blank">/text/scalc/guide/integer_leading_zero.xhp</a></p>
<p dir="auto">Title is: Entering a Number with Leading Zeros</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>