Help

IF AND Statement Help

Topic Labels: Formulas
Solved
Jump to Solution
583 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Wendy_Yelsik
6 - Interface Innovator
6 - Interface Innovator

Here is my formula which I need to add a few more statements too.   

 

IF(AND({LOS2} >= .0, {LOS2} <.26), "First 3 Months", IF(AND({LOS2} > .25, {LOS2} < 1.00), "Within 1 Year", IF(AND({LOS2} >= 1.00, {LOS2} < 2.00), "1 - 2 Years", IF(AND({LOS2} >= 2.00, {LOS2} < 3.00),"2 - 3 Years",  IF(AND({LOS2} >= 3.00,{LOS2} < 4.00,"3 - 4 Years"))))))
 
Here is a screen shot of the table.  It isn't capturing the last statement in the formula; it is returning nothing. It should return 3-4 Years.  What am I missing?   
 
Wendy_Yelsik_0-1677787852038.png

 

1 Solution

Accepted Solutions
Ben_Young1
11 - Venus
11 - Venus

Hey @Wendy_Yelsik

Try this:

IF(
    AND(
        {LOS2} >= .0,
        {LOS2} <.26
    ),
    "First 3 Months",
    IF(
        AND(
            {LOS2} > .25,
            {LOS2} < 1.00
        ),
        "Within 1 Year",
        IF(
            AND(
                {LOS2} >= 1.00,
                {LOS2} < 2.00
            ),
            "1 - 2 Years",
            IF(
                AND(
                    {LOS2} >= 2.00,
                    {LOS2} < 3.00
                ),
                "2 - 3 Years",
                IF(
                    AND(
                        {LOS2} >= 3.00,
                        {LOS2} < 4.00
                    ),
                        "3 - 4 Years"
                    )
                )
            )
        )
    )
)

Your very last AND() function was missing the necessary closing parentheses that would isolate the desired return value.

Here's what the snippet looked like:

IF(
    AND(
        {LOS2} >= 3.00,
        {LOS2} < 4.00,
        "3 - 4 Years"
    )
)

Here's what it looks like corrected:

IF(
    AND(
        {LOS2} >= 3.00,
        {LOS2} < 4.00
    ),
        "3 - 4 Years"
)

See Solution in Thread

2 Replies 2
Ben_Young1
11 - Venus
11 - Venus

Hey @Wendy_Yelsik

Try this:

IF(
    AND(
        {LOS2} >= .0,
        {LOS2} <.26
    ),
    "First 3 Months",
    IF(
        AND(
            {LOS2} > .25,
            {LOS2} < 1.00
        ),
        "Within 1 Year",
        IF(
            AND(
                {LOS2} >= 1.00,
                {LOS2} < 2.00
            ),
            "1 - 2 Years",
            IF(
                AND(
                    {LOS2} >= 2.00,
                    {LOS2} < 3.00
                ),
                "2 - 3 Years",
                IF(
                    AND(
                        {LOS2} >= 3.00,
                        {LOS2} < 4.00
                    ),
                        "3 - 4 Years"
                    )
                )
            )
        )
    )
)

Your very last AND() function was missing the necessary closing parentheses that would isolate the desired return value.

Here's what the snippet looked like:

IF(
    AND(
        {LOS2} >= 3.00,
        {LOS2} < 4.00,
        "3 - 4 Years"
    )
)

Here's what it looks like corrected:

IF(
    AND(
        {LOS2} >= 3.00,
        {LOS2} < 4.00
    ),
        "3 - 4 Years"
)
Wendy_Yelsik
6 - Interface Innovator
6 - Interface Innovator

Thanks.  I will give it a try.   - Wendy