Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: IF STATMENT - IS THIS POSSIBLE???

  1. #1
    Board Regular CJ's Avatar
    Join Date
    Feb 2002
    Location
    CHESTER, ENGLAND
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Please could someone help me with an IF STATEMENT, to me it seems impossible, but after seeing some of the IF STATEMENTS queries solved lately on this FORUM. I thought I would give this one a try.
    What I am trying to do is this:

    IF(C1&C2=”HOL”,”SICK”,”STUDY”, then the value of cell APRIL 02 B20)

    IF NONE OF THE ABOVE APPLY THEN FOLLOW ON TO

    IF(C1&C2=”UN-PAY”,”FLEXI”, then the value of 00:00)

    IF NONE OF THE ABOVE APPLY THEN FOLLOW ON TO

    C2-C1

    I’m desperate for an answer!!!!!!!!

    CHRIS


  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Not sure if I read this right, but try
    =IF(AND(OR(C1={"hol","sick","study"}),OR(C2={"hol","sick","study"})),B20,IF(AND(OR(C1={"un-pay","Flexi"}),OR(C2={"un-pay","Flexi"})),0,C2-C1))

    Note:

    This produces an error if say C1 is HOL and C2 is flexi

  3. #3
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Chris,

    Try,

    =IF(AND(OR(C1={"HOL","SICK","STUDY"}),OR(C2={"HOL","SICK","STUDY"})),'APRIL 02'!B20,IF(AND(OR(C1={"UN-PAY","FLEXI"}),OR(C2={"UN-PAY","FLEXI"})),0,C2-C1))

    Unsure if this will work. What happens if the person goes home sick at midday for instance. You want to be able to pay them for the half day and pay them for the half sick day, right?

    Need a few more specifics how you are handling the others scenarios.

    HTH,
    Jay

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,308
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hiya,

    If I interpreted correctly you want the OR statement:

    =If(OR(C1&C2="HOL",C1&C2="Sick",C1&C2="Study"),B20,IF(OR(C1&C2="UN-PAY",C1&C2="FLEXI"),00:00),c2-c1))

    Hope that helps out.
    Adam

  5. #5
    Board Regular CJ's Avatar
    Join Date
    Feb 2002
    Location
    CHESTER, ENGLAND
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks IML & JAY & ADAM

    I will now test out out all 3 solutions

    CHRIS


Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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