Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

Nested IF Statements

Janet Cook
edited 12/09/19 in Archived 2017 Posts

Brand new to SmartSheet.  Looking for best method for nested IF/THEN statements to provide status.  Or alternate methods.  Example... IF column N has any value, THEN column B shows Status 1, IF column O has any value, THEN column B shows Status 2, etc.  My nested IF/THEN statement from Excel didn't import.

Tags:

Comments

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭

    Nested IF/Then statements work great in Smartsheets but there are nuances you have to be aware of. Smartsheets calls all cells by their Column Name and Number. i.e. if your column name is product and you want cell 2 you would type it Product2. If your column name contains spaces or numbers then you would enclose the column name in a bracket. e.g, [Product Name]2. You will have to replace the B2 with your actual column header names.

    =IF(NOT(Isblank([Column N name]1), "status 1", IF(NOT(Isblank([Column O Name]1, "Status 2", "Status 3"))

    Would be an example of what you are looking for. It's looking in the order you selected. However, if you had data in column N and O, it would only show column N. A best practice I use for constructing IF statements checking multiple fields is to look for your final IF first so that it fires the correct response. Otherwise, your initial IF will always fire as true and give you the response without checking out the rest of the statement. 

This discussion has been closed.