Contenido del Curso
Google Spreadsheets
Google Spreadsheets
2. Formatting of Cells and Ranges
Basic Editing OperationsFormatting DataWorking with FontsFormatting Text and Filling with ColorFormatting BordersMerging Cells and Text AlignmentClear Formatting and Paint Format ToolsSelecting Cells and RangesAdjusting Column and Row Size and PositionCopying and Deleting Columns and Rows Freezing and Grouping Rows and Columns
AND and OR Functions
The AND function returns TRUE if all the specified conditions are true. If even one condition is false, the function returns FALSE. AND is helpful for verifying whether a value meets multiple criteria at once.
Syntax and Examples:
AND(logical_expression1, logical_expression2,...logical\_expression2, ...)
- logical_expression1 - A logical expression or a cell reference that evaluates to a logical value (TRUE or FALSE).
- logical_expression2, ... - OPTIONALOPTIONAL Additional logical expressions or cell references.
Value (A) | Value (B) | Value (C) | Formula | Result | Comment |
---|---|---|---|---|---|
50 | 100 | 25 | AND(A2 > 0, B2 > 0, C2 > 0) | TRUE | All values A2, B2, and C2 are greater than 0, so the result is TRUE. |
10 | 50 | -5 | AND(A3 > 0, B3 > 0, C3 > 0) | FALSE | C3 is negative, so the result is FALSE. |
60 | 85 | 200 | AND(A4 + B4 > 100, C4 / 2 < 120) | TRUE | A4 + B4 is greater than 100, and C4 divided by 2 is less than 120; result is TRUE. |
150 | 75 | 50 | AND(A5 >= B5 * 2, C5 < 60, MOD(A5, C5) = 0) | TRUE | A5 is greater than or equal to twice B5, C5 is less than 60, and A5 is divisible by C5; result is TRUE. |
OR Function
The OR function returns TRUE if any of the specified conditions are true. If all conditions are false, the function returns *FALSE. OR is used to check whether values meet at least one of multiple criteria.
Syntax and Examples:
OR(logical_expression1, logical_expression2,...logical\_expression2, ...)
- logical_expression1 - A logical expression or a cell reference that evaluates to a logical value (TRUE or FALSE).
- logical_expression2, ... - OPTIONALOPTIONAL Additional logical expressions or cell references.
Value (G) | Value (H) | Value (I) | Formula | Result | Comment | |
---|---|---|---|---|---|---|
50 | 100 | 25 | OR(G2 > 60, H2 < 110, I2 = 0) | TRUE | Condition H2 < 110 is true, so the result is TRUE. | |
20 | 15 | 30 | OR(G3 < H3, G3 + I3 > 50) | TRUE | The second condition (G3 + I3 > 50) is true, so the result is TRUE. | |
200 | 40 | 100 | OR(MOD(G4, 50) = 0, H4 + I4 < 150) | TRUE | Both conditions (G4 divisible by 50 and H4 + I4 < 150) are true; result is TRUE. | |
5 | 8 | 12 | OR(LEN(G5 & H5 & I5) > 3, G5 + H5 + I5 = 30) | TRUE | The condition using LEN is true because the combined string length exceeds 3. | |
30 | 20 | 10 | OR(SQRT(G6) > 5.5, G6 / H6 * I6 > 20) | TRUE | The first condition (SQRT(G6) > 5.5) is true; result is TRUE. | |
0 | 25 | 50 | OR(ABS(G7) = 0, ROUND(H7 / I7, 2) = 0.5) | TRUE | The first condition (ABS(G7) = 0) is true; result is TRUE. |
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 7. Capítulo 1