Aplicar formatu condicionáu

Using the menu command Format - Conditional - Condition, the dialog allows you to define conditions per cell, which must be met in order for the selected cells to have a particular format.

Iconu d'alvertencia

P'aplicar formatu condicionáu, tien d'habilitar la función Cálculu automáticu. Escueya Ferramientes - Conteníu de les caxelles - Calcular automáticamente (apaez una marca de verificación xuntu al comandu cuando la función de cálculu automáticu ta activada).


El formatu condicionáu dexa, por exemplu, destacar los totales que tán percima del permediu de tolos totales. Si los totales camuden, el formatu camuda según correspuenda, ensin necesidá d'aplicar otros estilos de forma manual.

Pa definir les condiciones

  1. Esbilla les caxelles que tengan de tener un formatu condicionáu.

  2. Choose Format - Conditional - Condition.

  3. Escriba les condiciones nel diálogu. Pue ver una descripción detallada del diálogu na Ayuda de LibreOffice; de siguío amuésase un exemplu:

Exemplu de formatu condicional: Resaltar los totales percima/debaxo del valor permediu

Pasu 1: Xenerar valores numbéricos

Quiciabes deseye destacar de forma especial determinaos valores de la fueya, por exemplu, nuna fueya de cifres de vientes, los valores que tean sobre la media en verde y en colloráu los que tean per debaxo. Col formateáu condicionáu nun va haber problema.

  1. First of all, create a table in which a few different values occur. For your test you can create tables with any random numbers:

    Introduza nuna caxella la fórmula ALEATORIU() pa tener un númberu ente 0 y 1. Si deseya númberos enteros ente 0 y 50, introduza como fórmula =ENTERU(ALEATORIU()*50).

  2. Copie la fórmula pa crear una filera de númberos aleatorios. Faiga clic na esquina inferior derecha de la caxella escoyida y arrastre escontra la derecha hasta escoyer l'área deseyada.

  3. De forma similar, arrastre la esquina de la caxella hasta la parte inferior derecha pa crear más files de númberos aleatorios.

Pasu 2: Definir estilos de caxella

The next step is to apply a cell style to all values that represent above-average turnover, and one to those that are below the average. Ensure that the Styles window is visible before proceeding.

  1. Faiga clic nuna caxella balera, active'l menú contestual y escueya Formatear caxelles.

  2. In the Format Cells dialog on the Background tab, click the Color button and then select a background color. Click OK.

  3. In the Styles deck of the Sidebar, click the New Style from Selection icon. Enter the name of the new style. For this example, name the style "Above".

  4. Pa definir otru estilu vuelva calcar na caxella balera y siga de nuevu'l procesu descritu. Asigne un color de fondu distintu a la caxella y asigne un nome (nesti exemplu, "Menor que").

Pasu 3: calcular el permediu

Nel nuesu exemplu tenemos de calcular el permediu de los valores aleatorios. El resultáu asítiase nuna caxella:

  1. Asitie'l cursor nuna caxella balera, por exemplu, J14, y escueya Inxertar - Función.

  2. Select the AVERAGE function. Use the mouse to select all your random numbers. If you cannot see the entire range, because the Function Wizard is obscuring it, you can temporarily shrink the dialog using the Shrink icon.

  3. Faiga clic en Aceutar pa zarrar l'Asistente pa funciones.

Pasu 4: Aplicar estilos de caxella

Agora namá-y queda aplicar el formateáu condicionáu a la fueya:

  1. Marque toles caxelles que contengan valores aleatorios.

  2. Choose the Format - Conditional - Condition command to open the corresponding dialog.

  3. Escueya agora como condiciones: Si'l valor de la caxella ye menor que J14, aplicar el formatu "Embaxo", y si ye mayor o igual, el formatu "Enriba".

Pasu 5: Copiar estilu de caxella

Aplicar darréu'l formateáu condicionáu a otres caxelles:

  1. Faiga clic sobre una de les caxelles a les qu'asignara'l formateáu condicionáu.

  2. Copie la caxella nel cartafueyu.

  3. Escueya les caxelles que tengan de tener el mesmu formatu.

  4. Choose Edit - Paste Special - Paste Special. The Paste Special dialog appears.

  5. In the Paste area, check only the Formats box. All other boxes must be unchecked. Click OK. Or you can click the Formats only button instead.

Please support us!