TechRepublic Cloud Google zdnet_core.search.query_placeholder Search How to create conditional statements for drop-down lists in Google SheetsUsing conditional statements in Google Sheets is an easy way to bring more power and accuracy to your invoices and more. By | How to create conditional statements for drop-down lists in Google Sheets If you fancy yourself a Google Sheets power user, have I got a tip for you. Have you ever wanted to create a spreadsheet that included the ability to select from a drop-down list, from which your selection would then dictate a value in another cell? This is called conditional statements and it's an incredibly powerful tool that can make your spreadsheets far more accurate and user friendly. Believe it or not, this is actually not too difficult. I want to show you how to create such a conditional statement. SEE:Google Sheets: Tips every user should master(TechRepublic) What you'll needThe only thing you'll need to make this work is a Google account. As long as you can log in to Google drive, you should be good to go. How to create the drop-down listThe first thing we have to do is create the drop-down list, from which we'll select our options. Let's create a list with the following options:
Of course, you use whatever you want for the "product" name as well as the value. SEE:Hiring kit: Network administrator(TechRepublic Premium) To create this drop-down, open a new Google Sheets document and select a cell. From the Data menu drop-down, select Data Validation (Figure A). Figure A The Data Validation entry in the Data menu drop-down. In the resulting window, you should see the cell you selected listed (Figure B). Figure B Creating the drop-down list in Google Sheets. In the Criteria drop-down, select List Of Items. This will change the field to the right such that you can enter your items in a comma-separated list, so: blue,red,pink,purple,yellow,greenOnce you've entered the list of items, click Save and your drop-down is ready to go (Figure C). Figure C Our data validation drop-down is ready. How to create the conditional statementThis is the more challenging part of the task, only because the conditional statement is a bit complex. Make sure you have as many right parenthesis as you have left, otherwise the statement will fail. For our example, our drop-down is in cell A8, so the conditional statement would be: =IF(A8="blue",1,IF(A8="red",2,IF(A8="pink",3,IF(A8="pink",4,IF(A8="purple",5,IF(A8="yellow",6,IF(A8="green",7)))))))Once you've typed out the statement, hit Enter on your keyboard and it's ready to go. If you select a different entry from the drop-down, you'll see the associated value populates the cell with the conditional statement. That's it, you've created a powerful tool to enhance your Google spreadsheets. Use this to give your spreadsheets more power and more accuracy. Also see
Related TopicsEditor's Picks
Visit TechRepublic
|