+ Reply to Thread
Results 1 to 3 of 3

If statements using "AND" "OR"

  1. #1
    Registered User
    Join Date
    06-25-2007
    Posts
    12

    If statements using "AND" "OR"

    I am trying to do an if statement that looks at two two cells and gives me a reference.

    I have duplicate job numbers and in some cases one might be booked and one might be cancelled. I am trying to look at column a and determing if its a duplicate to the one above, If it si then I want to look at if it has a booked or cancelled status. This is what I tried.

    =IF(AND(OR(A5=A4,W5="booked",W5="cancelled")),2)

    Please help

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try

    =IF(A5=A4,IF(OR(W5="booked",W5="cancelled"),2,""),"")

    This will check if A6=A4, if yes it will check if W5="Booked" or "Cancelled", if yes it will return a 2.. otherwise a blank is returned.

    Not sure if that is the logic you intendend or not.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-19-2008
    Posts
    6
    Is this what you mean?

    IF(A5=A4,IF(W5="booked","duplicate:booked",IF(W5="cancelled","duplicate:cancelled","duplicate:other status")),"")

    check if A5 = A4. If not; result = empty.
    If A5 = A4, then check and show the latest status.

+ 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