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.

IF/AND Functions

Options
Darian Nielson
Darian Nielson ✭✭
edited 12/09/19 in Archived 2016 Posts

I am trying to create a sheet that will auto update a number in a cell using multiple IF AND statements. Is it possible to have multiple IF(AND statements in one cell or what is the format? When I have one statement it works properly, but I cannot figure out how to have it work with two or more. I am not worried about the color conditions so much, just the logic statements. Below is a list of what I am trying to accomplish.

Β 

My first statement:Β =IF(AND([Number of Projects]3 < 6, [Currently Projected Hrs]3 < 121), "1", "2")

Β 

IF number of projects is below 6 & currently project hours are below 121 THEN make staffing demand green with a number 1

IF number of projects is above 5 & currently project hours are below 121 THEN make staffing demand yellow with a number 1

IF number of projects is above 5 & currently project hours are above 120 THEN make staffing demand red with a number 2

IF number of projects is below 6 & currently project hours are above 120 THEN make staffing demand yellow with a number 2

Β 

Β 

IF number of projects is below 11 & currently project hours are below 241 THEN make staffing demand red with a number 2

IF number of projects is above 10 & currently project hours are below 241 THEN make staffing demand yellow with a number 2

IF number of projects is above 10 & currently project hours are above 240 THEN make staffing demand red with a number 3

IF number of projects is below 11 & currently project hours are above 240 THEN make staffing demand yellow with a number 3

Comments

  • Gwyneth C
    Gwyneth C ✭✭✭✭✭✭
    edited 12/29/16

    Hi Darian,

    Β 

    Appologies for the delayed response. I consulted with one of our resident Formula experts to get some help with this one.

    Β 

    You should be able to achieve what you want with a series of nested IF formulas. Here's an example to get you started:

    Β 

    =IF(AND([Number of Projects]3 < 6, [Currently Projected Hrs]3 < 121), 1, IF(AND([Number of Projects]3 > 5, [Currently Projected Hrs]3 < 121), 1, IF(AND([Number of Projects]3 > 5, [Currently Projected Hrs]3 > 120), 2, add the next nested formula here...)))

    Β 

    Also, I recommend thisΒ Blog post on nested IFs:

    https://www.smartsheet.com/blog/support-tip-build-nested-IF

    Β 

    Hope this helps!

    Β 

    Regards,

    Gwyneth

    Β 

This discussion has been closed.