Basale aritmetiske handlinger og simple funktioner i Calc

    From The Document Foundation Wiki
    This page is a translated version of the page Videos/Basic arithmetic operations and simple functions in Calc and the translation is 15% complete.
    Outdated translations are marked like this.
    Other languages:

    Forord

    Videoerne viser, hvordan "Basale artimeriske handlinger og simple funktioner i Calc" kan udføres i LibreOffice og linker til denne side, som giver flere oplysninger og detaljer.

    Links til videoerne

    Link til videoen på tysk/DE-German: Grundrechenarten in Calc
    Link til videoen på tysk/DE-German: Einfache Funktionen in Calc

    Limk to the Video (in German [DE]):

    Basale aritmetiske handlinger i Calc

    Denne video viser, hvordan Basic arithmetics Overview in Calc kan bruges (+, -, x, ÷).

    Operatorer

    Vi er i regnearket "Basale arihmetiske handlinger" table. Den farvede tabel viser operatorerne i en skole-visning og hvordan de bruges i Calc.

    The colored table shows the operators in the school view and how they are used in Calc.

    Basic arithmetics Overview in Calc

    Beregn værdier direkte i formlen

    Tallet 40 findes i celle E9. Hvis vi klikker på denne celle, ser vi formlen, der beregner den viste værdi. "=30+10" blev indtastet i cellen, altså en formel med direkte indtastet værdier. Det er en simpel sammenlægning af to tal. Tilsvarende beregninger af direkte værdi med fratrækning "=30-10", multiplikation "=30*10" og division "=30/10" findes i cellerne E10 til E12.

    If you click in this cell, you see in the "Formula bar" the formula that calculates the displayed value.

    "=30+10" was entered in the cell, thus a formula with directly entered values.

    It is a simple addition of two numbers.

    Corresponding calculations of direct values with subtraction "= 30 - 10", multiplication "=30*10" and division "= 30 / 10" are contained in cells E10 to E12.

    Beregn værdier fra andre celler

    I cellen G9 lægges de samme tal sammen, men med værdier fra andre celler. På formellinjen kan vi nu se formlen "=I11+I9". Vi klikker ovenfor på formellinjen og de to reference vises blå-rød markeret. Vi forlader formellinjen med Escape. Cellerne G10 til G12 er igen de tilsvarende beregninger "=I11-I9", "=I11*I9", "=I11/I9" med værdier fra andre celler.

    In the formula bar you now see the formula "= I11 + I9".

    Click above in the formula bar and the two reference cells are displayed blue-red marked.

    Leave the formula bar with Esc(ape).

    The cells G10 to G12 are again corresponding calculations "= I11 - I9", "= I11 * I9", "= I11 / I9" with values from other cells.

    Generer summer med funktionen “Sum”

    Summer kan beregnes over flere sammenhængende celler, hvis indhold er tal. Det kan gøres på en kolonne eller en række. Vi placerer markøren på celle I14 og klikker på symbolet "Sum". Tallene ovenover i I9 til I13 vises markeret med blåt. Vi trykker på Retur. Summen af cellerne I9 til I13 vises i I14. Læg mærke til, at negative tal, som i I13, også beregnes som vist. Vi placerer nu markøren på N9 og klikker på symbolet ∑ (sum) igen. Tallene I9 til M9 til venstre for det vises med blåt på linjen. Vi trykker på Retur.

    This can be done in a column or row.

    Place the cursor in cell I14 and click on the "Sum" symbol.

    The numbers above in I9 to I13 blue marked are displayed.

    Press ↵ Enter.

    The sum of the cells, I9 to I13, is displayed in I14.

    It should be noted that negative numbers, as in I13, are also calculated accordingly.

    Now place the cursor in N9 and click the ∑ symbol (sum) again.

    The numbers I9 to M9 to the left of it are shown in blue on the line.

    Press ↵ Enter.

    Kopier en sum-formel

    I det næste trin kopierer vi sum-formlen i I14 til K14 med Ctrl+C og Ctrl+V. Summen af cellerne K9 til K13 vises nu i celle K14.

    The sum of the fields K9 to K13 is now displayed in cell K14.

    Business rounding

    Alleged wrong rounding, example:

    One adds (or by sum formula)

    1,728 + 22,656 = 24,384

    which is correct.

    If we now format to 2 decimal places, i.e.

    1.73 + 22.66 results in 24.38 and not 24.39

    In principle correct, but still wrong.

    Calc calculates with the full decimal places and rounds accordingly.

    You can limit the number of decimal places.

    This changes the appearance of the numbers on the screen, not the value in the cell - in the background Calc still calculates with three decimal places.

    Then the result is 24.38, as described above.

    What is the correct way to do business rounding?

    You can round numbers correctly:

    Calc offers the function =ROUND() [ (=RUNDEN() in German ] with two parameters:

    • the first is the number to be rounded
    • the second is the number of digits

    If you now add up, Calc calculates 24.39 as desired.

    Example - Formulas
    Example - Values

    Further possibility

    In the menu Tools ▸ Options ▸ LibreOfficeCalc ▸ Calculate you can check the box "Precision as shown".

    You have to do this with all Calc documents in which you calculate with currency amounts, i.e. with money.

    This setting is not recommended, however, because in this case all tables in the document are affected, even where you do not want to round - so it is a rather radical method.

    "Options LibreOffice Calc Calculate" dialog

    Simple funktioner i Calc

    Denne video viser, hvordan simple funktioner kan bruges i Calc. Vi åbner Calc og filen "Simple funktioner i Calc V6.ods".

    Open Calc and the file "Simple functions in Calc V6.ods".

    Function assistent:

    Function assistent

    Funcktionen: KODE

    Vi klikker på fanebladet "F = KODE". Vi klikker på cellen "B4" og ser på "Formellinjen" den formel, der fører til den viste værdi. Funktionen "KODE" returnerer koden for det første tegn i en tekst. I dette eksempel er det første tegn fra celle "C4" "M" fra "Martha".

    Click in cell "B4" and see in the "Formula bar" the formula that leads to the displayed value.

    The "CODE" function supplies the code of the first character of a text.

    In this example, the first character from cell "C4" is an "M" from "Martha".

    Funktionerne: ROMERTAL og ARABERTAL

    Nedenunder vælger vi fanebladet "F = ROMERTAL og ARABERTAL". Funktionen "ROMERTAL" konverterer et tal til et romertal. Det er tilfældet i cellerne "B4" og "C4". Funktionen "ARABERTAL" beregner værdien af et romertal. Det ser vi i cellerne "B6" og "C6".

    The function "ROMAN" converts a number into a Roman number.

    This is the case in cells "B4" and "C4".

    The "ARABIC" function calculates the value of a Roman number.

    You see this in cells "B6" and "C6".

    Funktionen: DATOVÆRDI

    Vi klikker på fanebladet "DATOVÆRDI" og på cellen "B4". Funktionen bestemmer det interne tal fra en tekst i et muligt datoformat. Cellen "B4" viser det interne tal for "01/04/2018". Og celle "C4" viser det interne tal for "dag nul", som er den "30/12/1899", som er standardværdien i Calc.

    The function determines an internal number from a text in a possible date format.

    Cell "B4" shows the internal number for "04/01/2018".

    And cell "C4" shows the internal number for the "day zero" this is the "12/30/1899", so the default value in Calc.

    Funktionen: ER.TOM

    Vi klikker på fanebladet "ER.TOM" og på cellen "B4". Funktionen "ER.TOM" forespørger, om den bestemte celle er tom og viser "SAND", hvis det er tilfældet.

    The "ISBLANK" function queries whether the specified cell is empty and displays "TRUE" if this is the case.

    Function: ER.FORMEL

    Vi klikker på fanebladet "ER.FORMEL" og på celle "B4". Funktionen "ER.FORMEL" forespørger, om den bestemte celle er en formelcelle viser "SAND", hvis det er tilfældet. I dette tilfælde er celle "C4" en formelcelle eller en celle, der indeholder en formel.

    The "ISFORMULA" function queries whether the specified cell is a formula cell and displays "TRUE" if this is the case.

    In this example, cell "C4" is a formula cell or a cell that contains a formula.

    Funckionen: NU

    Vi klikker på fanebladet "NU" og på cellen "B4". Funktionen "NU" viser computeren aktuelle tidspunkt. Tiden i cellen opdateres med "F9". Forudsætningen er, at computeren har den rigtige tidszone. På moderne computere indstilles tiden sædvanligvis over internettet.

    The "NOW" function shows the current time of the computer.

    With "F9" the time in the cell is updated.

    The prerequisite is that the computer time has the correct time zone.

    With modern computers, the time is usually set via the Internet.

    Funktionen: UGE.NR

    Vi klikker på fanebladet "UGE.NR" og på celle "D4". Funktionen "WEEKNUM" viser en given datos kalenderuge. I vort eksempel vises "13" i "D4" for datoen 01/04/2018.

    The "WEEKNUM" function shows the calendar week for a given date.

    In this example, "D4" shows "13" for 04/01/2018.

    Indsæt en funktion (STORE.BOGSTAVER)

    Vi klikker på fanebladet "Indsæt funktion". I celle "C4" skriver vi "anna". Vi indsætter en funktion ved at klikke på funktionsassistenten 202004 LOENHB Symbol Function assistent.png på beregningslinjen. Dialogen "Funktionsassistent" åbnes og på fanebladet "Funktioner" kan vi vælge en funktion under "Funktion". Vi vælgerfunktionen "STORE.BOGSTAVER" ved at dobbeltklikke på "STORE.BOGSTAVER". I feltet "Tekst" taster vi C4 og OK. Funktionsassistenten i Calc tilbyder et væld af funktioner til beregning.

    In the cell "C4" you write "anna".

    Insert into the one function by clicking on the function assistant in the calculation bar.

    The dialog "Function Assistant" opens and in the "Functions" tab you can select a function under "Function".

    Select the "UPPER" function by double-clicking on "UPPER".

    In the "Text" field you enter C4 and OK.

    The Function assistant in Calc offers a wealth of functions for the calculation.

    Se dig omkring

    Se dig omkring i funktionerne og find ud af, hvilke funktioner, der kan hjælpe dig med beregningerne i Calc.

    Further informations

    Arbejdsfiler

    Documentation / Manuals

    Here you will find the Documentation / Manuals:

    Any questions?

    For questions on this topic go to:

    Get Involved

    Join us today and help us to make it even better!

    LibreOffice is Free Software and is made available free of charge.

    Your donation, which is purely optional, supports our worldwide community.

    If you like the software, please consider a Donation.