+ Reply to Thread
Results 1 to 4 of 4

What's wrong with this =if and =and and =or statement

  1. #1
    Registered User
    Join Date
    04-04-2011
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    5

    What's wrong with this =if and =and and =or statement

    =IF(AND(I14="Full Time",D14>2,OR(G14=$C$7,$C$6,)),J14*$F$9,0)

    Basically If I14=Full time
    AND
    D14>2
    AND
    G14=C7 or C6

    then J14*F9

    If not,
    0

    I'm not sure what's wrong with the function, is it the AND or OR part?

    Thanks!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: What's wrong with this =if and =and and =or statement

    Your OR syntax is wrong...

    instead of: OR(G14=$C$7,$C$6,)

    use OR(G14=$C$6, G14=$C$7)
    Last edited by zbor; 04-05-2011 at 02:53 AM.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: What's wrong with this =if and =and and =or statement

    You could also use this:

    =(I14="Full time")*(D14>2)*((G14=$C$6)+(G14=$C$7))*F9*$J$14

  4. #4
    Registered User
    Join Date
    04-04-2011
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: What's wrong with this =if and =and and =or statement

    Quote Originally Posted by zbor View Post
    Your OR syntax is wrong...

    instead of: OR(G14=$C$7,$C$6,)

    use OR(G14=$C$6, G14=$C$7)
    yarrr..its been a long day

    thank you!!!

+ Reply to Thread

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