OpenOffice Calc: Porovnajte dva stĺpce - ako to funguje
V tomto praktickom tipe vám ukážeme, ako môžete porovnať dva stĺpce s programom OpenOffice Calc. Bezplatná alternatíva k programu Microsoft Excel sa tiež dokáže vyrovnať s populárnou funkciou „if“.
OpenOffice Calc: Porovnajte dva stĺpce
V tabuľkovom kalkulátore z OpenOffice môžete porovnávať dva stĺpce pomocou funkcie if a priradených operátorov porovnávania (napríklad =, ). Vďaka integrovanému sprievodcovi funkciami je štruktúra funkcií veľmi jednoduchá.
- Príprava: Na začiatku musíte pre porovnanie vytvoriť nový stĺpec. Výsledky budú prezentované neskôr.
- Sprievodca funkciami: Kliknite na prvú prázdnu bunku novovytvoreného stĺpca. Neskôr sa tam vloží funkcia if pre prvé hodnoty. Potom kliknite na "Vložiť" -> "Funkcia ..." v ponukovej lište. Prípadne otvorte sprievodcu pomocou klávesov [Ctrl] + [F2].
- Funkcia: Vyberte databázu „Logic“ v položke ponuky „Category“ v ľavej časti Sprievodcu funkciami. Existuje funkcia if, ktorá dokáže porovnávať dve hodnoty.
- Testovacie hodnoty: Po výbere funkcie „IF“ dvojitým kliknutím musíte určiť, ktoré bunky sa majú na porovnanie zohľadniť. V časti „Skontrolovať“ zadajte prvú bunku prvého stĺpca (napríklad A2). Ďalej musíte zvoliť operátora porovnávania. Prehľad nájdete napríklad na Wikipédii. Teraz stačí zadať iba prvú bunku druhého stĺpca (napríklad A2 = B2).
- Výstup: V položkách „Then_Value“ a „Otherwise_Value“ určíte, čo sa má výstupovať, ak je podmienka true (Then_Value) alebo false (Otherwise_Value). Textový výstup musí byť uzavretý do dvoch úvodzoviek (napríklad „text“). Po dokončení funkcie potvrďte kliknutím na „OK“.
- Prevzatie funkcie: Nakoniec musíte preniesť funkciu iba na ďalšie riadky. Ak to chcete urobiť, kliknite na malé políčko označenej bunky a presuňte funkciu cez stĺpec úplného porovnania.
Ak chcete porovnanie zdôrazniť vizuálne, ukážeme vám na ďalšom praktickom tipe, ako môžete použiť podmienené formátovanie.