

If so, no discount should be applied, otherwise, it's 5% off: There are two ways to check that:įor example, the following formula checks if cells in column E are empty. There are cases when your result depends on whether the cell is empty or not. Then enter the IF function in G2, and the second argument will be represented by the formula that calculates the discount: If the total is more than 200, then the client gets a 10% discount.įor that, you need to use column G and name it "Discount". However, what is very important here is that the IF function makes it possible to not only fill cells with certain numbers based on the conditions met but also calculate.įor example, let's say you offer your clients various discounts based on the total value of the purchase. You can use numbers for the arguments just as you did with the text. If the text is being used as the argument, then it must be enclosed in double-quotes. Now, all you have to do is to copy this function down column F. If everything is correct, F2 will return the text "Our Country": =IF(B2="West","Our Country","Rest of the World") Your entire formula should look like this: Do not forget to finish your formula entry by closing parenthesis ")" and pressing "Enter". F2 will return this value if the condition is not met: "Rest of the World". In this case, it will be the text "Our Country".Īnd again, after the comma, write the value of the 3 rd argument. The second argument is a value that F2 will return if the condition is met. Then enter comma (,) and specify the second argument. As with the other Google Sheets functions, you don't need to enter the address of the cell manually – a mouse click is enough. And you should choose "IF".Īfter that, all your actions will be accompanied by prompts as well.įor the first argument of the IF function, enter B2="West". That's why right after you type the letter "i" it will prompt you to choose a function that begins with that same letter.

Google Sheets will immediately understand that you are going to enter a formula. Place the cursor in F2 to make the cell active and type in the equality sign (=). "West" region represents local sales (Our Country), while the rest are the sales from abroad (Rest of the World). Let's add the "Country" column to the data table. Since there is a lot of data, you need this description field to be created automatically for each entry.Īnd this is when the IF function comes to play. To accomplish that, you should add another descriptive field for each sale – a country where the sales took place. Imagine that you need to separate sales made in your local regions from those from abroad. This is what your sales data may look like in Google Sheets: Let's assume that you are working in the company selling chocolate in several consumer regions with many clients. Let us try and ask such a question together.
#BLANK BALANCE SHEET HELPER HOW TO#
How to formulate the question properly, you may wonder? To do that, you can write a logical expression using such helpful symbols (or comparison operators) as "=", ">", "=", "". Google Sheets answers this question with either "yes" or "no", i.e. The first argument represents a logical question. Let's explore the arguments of our IF function in more detail. value_if_false – (optional) the operation that is carried out if the test is FALSE.value_if_true – (required) the operation that is carried out if the test is TRUE.logical_expression – (required) a value or logical expression that is tested to see if it is TRUE or FALSE.=IF(logical_expression, value_if_true, value_if_false) The syntax for the IF function and its arguments are as follows: This question and the alternative actions are known as three arguments of the function. So, the IF function allows you to ask a question and indicate two alternative actions depending on the received answer. This is what a decision tree may look like: Whenever you use the IF function, you create a decision tree in which certain action follows under one condition, and if that condition is not met – another action follows.įor this purpose, the condition of the function must be in a format of the alternative question with only two possible answers: "yes" and "no". What is the IF function in Google Sheets? Make Google Sheets build IF formulas for you – IF Formula Builder add-on.

SWITCH as an alternative to multiple IFs.How to write out the function properly?.What is the IF function in Google Sheets?.In this tutorial, I invite you to take a closer look at how Google Spreadsheet IF function works and what advantages you will get from using it. The IF function in Google Sheets is one of the easiest functions to learn, and while this holds true, it is also a very helpful one.
