Results 1 to 5 of 5

If Statement with AND problem

Threaded View

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    11

    If Statement with AND problem

    Hi,

    My problem here is that in my formula there is two different logical test that has the same condition.
    What my formula needs to do is to give the sanction depending on the number of instance per offense.

    Example:

    Tardy:
    1st Offense: Documented Coaching
    2nd offense: Documented Coaching
    3rd offense: First Written
    4th Offense: Final Written
    5th offense: 2 day Suspension
    6th offense:Termination

    Tardy:
    1st Offense: Documented Coaching
    2nd offense: Documented Coaching
    3rd offense: First Written
    4th Offense: Final Written
    5th offense: 2 day Suspension
    6th offense:Termination

    AWOL :
    1st Offense: Final Written
    2nd offense: 2 day Suspension
    3rd offense: Termination

    Undertime:
    1st Offense: 2 day Suspension
    2nd Offense: Termination

    here is the formula I am using right now: =IF(AND(K28="Tardy",L28<=2),"Documented Coaching",IF(AND(K28="Tardy",L28=3),"First Written",IF(AND(K28="Tardy",L28=4),"Final Written",IF(AND(K28="Tardy",L28=5),"2 day Suspension",IF(AND(K28="Tardy",L28>=6),"Termination",IF(AND(K28="Overbreak",L28<=2),"Documented Coaching",IF(AND(K28="Overbreak",L28=3),"First Written",IF(AND(K28="Overbreak",L28=4),"Final Written",IF(AND(K28="Overbreak",L28=5),"2 day Suspension",IF(AND(K28="Overbreak",L28>=6),"Termination",IF(AND(K28="Undertime",L28=1),"2 day Suspension",IF(AND(K28="Undertime",L28>=2),"Termination",IF(AND(K28="Absence Unplanned and Unapproved",L28=1),"First Written",IF(AND(K28="Absence Unplanned and Unapproved",L28=2),"Final Written",IF(AND(K28="Absence Unplanned and Unapproved",L28=3),"2 day Suspension",IF(AND(K28="Absence Unplanned and Unapproved",L28>=4),"Termination",IF(AND(K28="AWOL",L28=1),"Final Written",IF(AND(K28="AWOL",L28=2),"2 day Suspension",IF(AND(K28="Undertime",L28>=3),"Termination")))))))))))))))))))

    It works for all offenses except for overbreak since it has the same condition with tardy.
    Anyone who can help me sort this out?

    Thanks in advance.
    Last edited by bpiroma; 09-10-2012 at 09:27 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1