How to use Google Sheets' IF function for conditional calculations?

To use the IF function in Google Sheets for conditional calculations, follow these steps:

  1. Open Google Sheets and decide which cell you want to place your formula in.
  2. Select the cell you want to enter the formula into.
  3. Type the following formula: =IF(logical_expression, value_if_true, value_if_false) Replace "logical_expression" with your own condition, "value_if_true" with the value or calculation you want if the condition is true, and "value_if_false" with the value or calculation you want if the condition is false.
  4. Press "Enter" to apply the formula and see the result.
  5. Drag the bottom-right corner of the cell down to apply the formula to more cells if needed.

For example, let's say you have a column of numbers in cells A1 to A5, and you want to calculate a bonus of 10% for numbers greater than 100, and no bonus for numbers less than or equal to 100. You can use the following formula in cell B1:

=IF(A1 > 100, A1 * 0.1, A1)

When you enter this formula and apply it to cells B2 through B5, it will calculate the bonus for each number accordingly.