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
IFS Function
In this chapter we will explore the topic of the IFS Function. This function allows you to test multiple conditions and return the corresponding result for the first condition that evaluates to true. Unlike Nested IF, IFS avoids nesting, making it easier to work with multiple logical conditions and resulting in a more readable formula.
Syntax and Examples:
IFS(condition1, value1, condition2,value2,…condition2, value2, …)
- condition1 - The first condition to evaluate. This can be a boolean value, a number, an array, or a reference to any of these;
- value1 - The value returned if condition1 is TRUE;
- condition2, value2, … - Additional conditions and values if the first is evaluated as false.
Value (A) | Formula | Result | |
---|---|---|---|
3,250.00 | A2 - (A2 * IFS(A2 <= 10000, 0.005, A2 <= 25000, 0.01, A2 > 25000, 0.02)) | 3,233.75 | |
12,500.00 | A3 - (A3 * IFS(A3 <= 10000, 0.005, A3 <= 25000, 0.01, A3 > 25000, 0.02)) | 12,375.00 | |
30,000.00 | A4 - (A4 * IFS(A4 <= 10000, 0.005, A4 <= 25000, 0.01, A4 > 25000, 0.02)) | 29,400.00 |
Value (F) | Value (G) | Formula 1 | Customer 1 | Formula 2 | Customer 2 | |
---|---|---|---|---|---|---|
Hybrid Bike | 650 | IFS(ISBLANK($F2), "", AND($J$1="Customer 1", OR(AND($F2="Hybrid Bike", $G2<700), $F2="Mountain Bike")), "fits", TRUE, "does not fit") | fits | IFS(ISBLANK($F2), "", AND($L$1="Customer 2", OR($F2="Road Bike", AND($F2="Mountain Bike", $G2<600))), "fits", TRUE, "does not fit") | does not fit | |
Mountain Bike | 550 | fits | fits | |||
Road Bike | 800 | does not fit | fits | |||
Hybrid Bike | 700 | does not fit | does not fit | |||
Road Bike | 850 | does not fit | fits | |||
750 | ||||||
Mountain Bike | 600 | fits | does not fit |
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 7. Capítulo 3