Categories
Device

How to use the google sheets if function

Here’s how to use the SUM function in Google Sheets

  • Tweet
  • Share
  • Email

What to Know

  • Easiest option: Click the cell, select SUM in the Functions menu, and select the cells you want to add.
  • Or click the cell, enter =SUM( and select the cells. Close with ). Press Enter.
  • You can also use the Function button to create a sum.

This article explains how to use the SUM function in Google Sheets using the Functions menu, inputting it manually, and with the Function button. The screenshots are from the Google Sheets app for iOS, but instructions are the same on all platforms.

How to Write a SUM Function

Adding up rows or columns of numbers is a common operation carried out in all spreadsheet programs. Google Sheets includes a built-in function called SUM for this purpose. With a function in place, the spreadsheet automatically updates when you make changes in the range of cells in the formula. If you change entries or add text to blank cells, the total updates to include the new data.

Using the information above, write a SUM function like this:

In this case, the numbers in the parentheses are the individual cells being added. This can be a list, like (A1, B2, C10), or a range, like (A1:B10). The range option is how you add columns and rows.

How to Enter a SUM Function in Google Sheets

Before you begin, enter the information you want to add up into a spreadsheet, then follow these steps:

Click or tap the cell where you want to place the formula.

How to use the google sheets if function

Tap Enter text or formula to display the keyboard.

How to use the google sheets if function

Type =sum( to start the formula.

How to use the google sheets if function

Choose the numbers you want to add together. One way to do this is to tap the cells you want. The cell references appear inside the parentheses in the formula.

How to use the google sheets if function

To select a range of adjacent cells at once, tap one (for example, the first one in a row or column), then tap and drag the circle to select the numbers you want to add together.

You can include empty cells in a function.

How to use the google sheets if function

Enter a closing parenthesis to end the function, and then tap the checkmark to run the function.

How to use the google sheets if function

The function runs, and the sum of the numbers you selected appears in the cell you chose.

How to use the google sheets if function

If you change any of the values in the cells you selected, the sum updates automatically.

How to Create a Sum Using the Function Button

You can also use a menu to enter a function instead of typing it. Here’s how to do it.

Enter the data, then select the cell in which you want the sum to appear.

Click or tap the Function button.

On the desktop version of Google Sheets, Function is on the right side of the formatting bar and looks like the Greek letter sigma (∑).

How to use the google sheets if function

In the list of function categories, tap Math.

The Function menu on the desktop version of Google Sheets contains a few commonly used formulas. SUM may be on that list.

How to use the google sheets if function

The functions appear alphabetically. Scroll down, then tap SUM.

How to use the google sheets if function

In the spreadsheet, enter the range of numbers you want to add together.

How to Write a Function in Google Sheets

A function in Google Sheets and other spreadsheet programs like Microsoft Excel has three parts:

Working with Functions

How to use the google sheets if function

Lesson 15: Working with Functions

Introduction

A function is a predefined formula that performs calculations using specific values in a particular order. Excel includes many common functions that can be used to quickly find the sum, average, count, maximum value, and minimum value for a range of cells. In order to use functions correctly, you’ll need to understand the different parts of a function and how to create arguments to calculate values and cell references.

Watch the video below to learn how to create functions.

The parts of a function

Similar to entering a formula, the order in which you enter a function into a cell is important. Each function has a specific order—called syntax—that must be followed in order for the function to calculate properly. The basic syntax to create a formula with a function is to insert an equals sign (=), a function name (AVERAGE, for example, is the function name for finding an average), and an argument. Arguments contain the information you want the formula to calculate, such as a range of cell references.

How to use the google sheets if function

Working with arguments

Arguments can refer to both individual cells and cell ranges and must be enclosed within parentheses. You can include one argument or multiple arguments, depending on the syntax required for the function.

For example, the function =AVERAGE(B1:B9) would calculate the average of the values in the cell range B1:B9. This function contains only one argument.

How to use the google sheets if function

Multiple arguments must be separated by a comma. For example, the function =SUM(A1:A3, C1:C2, E1) will add the values of all of the cells in the three arguments.

How to use the google sheets if function

Creating a function

Google Sheets has a variety of functions available. Here are some of the most common functions you’ll use:

  • SUM: This function adds all of the values of the cells in the argument.
  • AVERAGE: This function determines the average of the values included in the argument. It calculates the sum of the cells and then divides that value by the number of cells in the argument.
  • COUNT: This function counts the number of cells with numerical data in the argument. This function is useful for quickly counting items in a cell range.
  • MAX: This function determines the highestcell value included in the argument.
  • MIN: This function determines the lowest cell value included in the argument.

To create a function using the Functions button:

The Functions button allows you to automatically return the results for a range of cells. The answer will display in the cell below the range.

    Select the range of cells you want to include in the argument. In our example, we’ll select D3:D12.How to use the google sheets if function

How to use the google sheets if function

How to use the google sheets if function

To create a function manually:

If you already know the function name, you can easily type it yourself. In the example below, which is a tally of cookie sales, we’ll use the AVERAGE function to calculate the average number of units sold by each troop.

    Select the cell where the answer will appear. In our example, we’ll select C10.

How to use the google sheets if function

How to use the google sheets if function

How to use the google sheets if function

How to use the google sheets if function

Google Sheets will not always tell you if your function contains an error, so it’s up to you to check all of your functions. To learn how to do this, read our article on why you should Double-Check Your Formulas.

Google Sheets function list

If you have experience using spreadsheets and want to use Google Sheets to make more advanced calculations, you can explore the Google Sheets function list. It is a handy reference for hundreds of financial, statistical, and data analysis functions.

How to use the google sheets if function

If you are familiar with functions found in Microsoft Excel’s Function Library, you will find that the Google Sheets function list has many of the same functions.

To access the function list:

Click the Functions button and select More functions. from the drop-down menu. The Google sheets function list will appear in a new browser tab.

If you’re comfortable with basic functions, you may want to try a more advanced one like VLOOKUP. You can check out our article on How to Use Excel’s VLOOKUP Function for more information. Like most functions, VLOOKUP works the same way in Excel and Google Sheets.