IF Statement with multiple values and conditions


#1

Hi,

I need help getting the following to work:

I have created date and status columns and I need to create a formula that calculates if the application is overdue and by how many days.

1. The first condition is 7 days since the creation date and the status is unassigned. The returned value should be "Overdue by one week".

2. The second condition is between 7-14 days since the creation date and the status is unassigned. The returned value should be "Overdue by more than a week".

3. The third condition is more than 15 days since the creation date and the status is unassigned. The returned value should be "Over due by more than two weeks".

Can someone please help?


#2

Try

IF(
    {Status}='Unassigned',
    IF(
        DATETIME_DIFF(TODAY(),{Creation Date},'d')>14,
        'Overdue by more than two weeks',
        IF(
            DATETIME_DIFF(TODAY(),{Creation Date},'d')>7,
            'Overdue by more than one week',
            IF(
                DATETIME_DIFF(TODAY(),{Creation Date},'d')=7,
                'Overdue by one week'
                )
            )
        )
    )

(Obviously, you’ll need to adjust field names to match yours.)


Note: Edited to correct stupidity on my part…


#3

That worked! Thank you so much.