It:Formato dei Numeri in NeoOffice Calc

From NeoWiki

(Difference between revisions)
Jump to: navigation, search

Valterb (Talk | contribs)
(translation starts)
Next diff →

Revision as of 14:55, 17 December 2007

NeoOffice Calc fornisce molti formati nei quali formattare un numero, ma possono essere definiti anche altri formati a piacimento in un foglio elettronico. Per poter fare questo si devono conoscere alcune regole.
I due segni principali che sono usati per codificare i formati di numero sono il carattere cancelletto # ed il carattere 0 che permette di mostrare degli 0 aggiuntivi se il numero contenesse un numero di cifre inferiori a quelle che ci aspettiamo.
Un codice di formato di numero può contenere da una a tre parti separate da un punto e virgola. Se non viene assegnata alcuna condizione

  • Il codice formato con solo una parte viene applicato a tutti i numeri.
  • La prima parte del codice, in un codice fatto di due parti, si applica ai numeri positivi ed allo zero, la seconda parte si applica ai numeri negativi.
  • Se il codice è costituito di tre parti, la prima riguarda i numeri positivi, la seconda quelli negativi e l'ultima lo zero.

Contents

Applicare un formato

  • Seleziona la cella della quale vuoi cambiare il formato;
  • Vi al menù Formato e scegli Celle…, oppure fai click col tasto destro del mouse nella cella da cambiare e scegli Formatta Celle… nel menù contestuale;
  • Nella finestra Formatta Celle che si apre, clicca sulla linguetta Numeri e seleziona la categoria che desideri (Numero, Frazione, Scientifico, ctc.) nella sezione Categoria;
  • Scegli il formato che vuoi nella sezione Formato. C'è una casella nella finestra che ti permette di vedere un'anteprima del risultato che verrà mostrato nella cella;
  • Puoi modificare il numero di cifre decimali ed il numero delle cifre significative digitando l'appropriato valore nei campi predisposti;
    Puoi anche modificare il numero di cifre dopo la virgola in una cella senza far ricorso alla finestra Formatta Celle cliccando sul bottone Aggiungi cifra decimale (è l'icona che mostra uno .0 con un piccolo segno + azzurro) oppure su Togli cifra decimale (è l'icona che mostra uno .0 con un piccolo segno rosso) nella barra della Formattazione.
  • Puoi anche aggiungere un separatore delle migliaia selezionando la casella Separatore migliaia. Il separatore per le migliaia utilizzato dipende dalla lingua impostato; fatto sta che per l'italiano il separatore è un punto in alto, e non in basso come invece è d'uso nei sistemi informatici.

Defining a custom format

If you want to apply a format which is missing in the list, you can define it in the field Format code.

  • Select the cell you want to format.
  • Go to the Format menu and click on Cells…, or right-click or Control-click in the cell and choose Format Cells… in the contextual menu.
  • In the Format Cells window which opens, click on the Number tab and select User-defined in the Category list.
  • In the Format code field, type the code you wish (see the examples in the tables below).
  • Click on the Add button (green with a white mark), then click OK.
  • This format is automatically added by NeoOffice to the appropriate category (Number, Fraction, Scientific, etc.), and when you select that format, User-defined is displayed under the Format code field.

Note: you can delete a user defined format by selecting it and clicking on the red icon with a white cross, to the right of the field Format code, then on OK.

Characters used in code

The following characters: #, 0, /, ?, @, as well as space, comma and period are used in code.

Non significant zeros

A zero is displayed in place of a 0 in code, if no digit is present in this location in the number.
Nothing is displayed in place of a # in code, if no digit is present in this location in the number.

Decimal numbers

You can choose the number of decimal places which will be displayed by giving it in the Decimals places box in the Options section. If you enter # signs after the period in the code, an integer will be displayed without decimal places. If you enter zeros after the period, an integer will be displayed with zeros in the decimal part.

The decimal separator depends on your language: period in English, comma in French.

Thousands separator

You can use the thousands separator you wish, depending on your language: comma, period or space. Check the Thousands separator box and enter the appropriate separator in the Format code field.


Format code Input Output
# ###,## 12345 12 345
12345,6 12 345,6
12345,67 12 345,67
12345,678 12 345,68
0,12 ,12
# ##0,## 0,12 0,12
# ###,00 123 123,00
# ### 0 empty cell
Standard format 0 0

Fractions

You can display the decimal part of a number as a fraction by using a slash / and question marks ?.


Format code Input Output
# ?/? 1,2345 1 2/9
# ??/?? 1,2345 1 19/81
# ??/??? 1,2345 1 87/371
12,3456 12 216/625


Numbers as text

If you want that values appear as text, you can enter the @ character in the Format code field. You can also place an apostrophe in front of the number in the formula bar. This method allows to write numbers containing spaces (different from the thousands separator) or starting with a zero, such as phone numbers, for example: '123 456 789
The text is left aligned by default. You can change the alignment by clicking on the icon in the menu bar (showing a right aligned text).

Conditions, Colors

You can define a format so that it only applies when certain conditions (three at the most) are met. For example, apply different colors to different values. Conditions must be placed between square brackets []. They are separated by a semicolon, and use the <, ≤, >, ≥, =, <> operators.

Black is the default color. The following colors: WHITE, BLUE, CYAN, GREEN, MAGENTA, RED, GREY are available. The condition, if any, must be placed in front of the color name.


Format code Input Output

[<=0][RED]# ##0,00;[>30][GREEN]# ##0,00;[BLUE]# ##0,00

-10 -10,00
15,25 15,25
35,8 35,80

Rounding

If you enter a decimal number with more digits after the period than indicated in the format code, this number is rounded following the mathematical rule.

Percentage

To display numbers as percentage, you just have to add the % symbol to the number format, for example 0.00%

Scientific format

Scientific notation allows you to write very large numbers using the powers of 10. To define a scientific format, enter # or 0 followed by E+, e+, E- or e-.


Format code Input Output
Standard 1e3, 1E3, 1e+3, 1E+3 1,00E+003
e-3 or 1E-3 1,00E-003
0E+0, ou #E+0 1000 1E+3
0,001 1E-3

Alignment on decimal separator

You can align decimal numbers correctly by using question marks to represent the digits after the decimal separator.
Note : if you want a good display, you have to use a non-proportional (or with fixed width) font , such as Andale Mono, Courier, Courier New or Monaco which are shipped with Mac OS X. Open Font Book in the /Applications folder to see what non-proportionnal fonts are available on your Mac

The table below has been created using Monaco font.


Currency format

The default currency format is defined in the Languages in the submenu Preferences… of the NeoOffice menu. You can select another currency in the drop-down menu under the Format section in the Format Cells.



This article in other languages: Français
Personal tools