+ Reply to Thread
Results 1 to 4 of 4

Complicated 3 Part If And Or

  1. #1
    Registered User
    Join Date
    07-06-2016
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    28

    Complicated 3 Part If And Or

    Hi there,

    I'm working on building a management tool that can determine which group completed an activity from a large data set with many variables. I currently have three if statements, and I'm wondering if there's anyway to combine them as opposed to having three columns with each of the formulas.

    =IF(AND(F2="C",G2="M")*OR(J2="UNCF",J2="CONF",J2="ANTC"),"y","n")
    - column F is "C"
    - column G is "M"
    - column J is "UNCF", "CONF", or "ANTC"
    then the activity was done by group 1.

    =IF(AND(F3="U",G3="M")*OR(J3="PAID",J3="PRPD"),"y","n")
    - column F is "U"
    - column G is "M"
    - column J is "PAID", or "PPRD"
    then the activity was done by group 2.

    =IF(AND(F4="U",G4="M")*OR(J4="CONF",J4="UNCF"),"y","n")
    - column F is "U"
    - column G is "M"
    - column J is "CONF", or "UNCF"
    then the activity was done by group 3.

    So essentially what I would like is one formula that determines which group completed the activity. Any help would be much appreciated!!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Complicated 3 Part If And Or

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Complicated 3 Part If And Or

    You can combine them pretty easily..

    Take the first formula
    =IF(AND(F2="C",G2="M")*OR(J2="UNCF",J2="CONF",J2="ANTC"),"y","n")
    Replace the "y" with "Group 1"
    Replace the "n" with the 2nd formula (minus the =)

    Now repeat for the y and n in that part,
    Replace "y" with "Group 2"
    Replace "n" With the 3rd formula (minus the =)

    Now repeat for the y and n in that part,
    Replace "y" with "Group 3"
    Leave the final "n" alone.


    Hope that helps.

  4. #4
    Registered User
    Join Date
    07-06-2016
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    28

    Re: Complicated 3 Part If And Or

    Awesome!! That worked perfectly:

    Now that I have that sorted out...
    The Group 1, 2, and 3 are going to be replaced with index matches that look up unit times in a table. For Group 1 and 3 there is only one column to look up the unit time from, for Group 2 there's one column with unit times for data lines that have "US" in column P, and another for data lines that have "CA" in column P. This is what I have so far but I'm not sure how to approach the CA/US:

    =IF(AND(F2="C",G2="M")*OR(J2="UNCF",J2="CONF",J2="ANTC"),INDEX(AD4:AD52,MATCH(I2,AB4:AB52,0)),IF(AND(F2="U",G2="M")*OR(J2="PAID",J2="PRPD"),"Group 2",IF(AND(F2="U",G2="M")*OR(J2="CONF",J2="UNCF"),INDEX(AJ4:AJ22,MATCH(I2,AI4:AI22,0)),"n")))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 01-03-2016, 11:48 PM
  2. Complicated multi part IF formula
    By drocus in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-25-2015, 12:31 AM
  3. Nested IF statement validating part 1 but not part 2 of conditional
    By methuselah90 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2014, 02:39 PM
  4. [SOLVED] Need a complicated formula to display part of current workbook name in a cell
    By ianpwilliams in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-06-2013, 01:41 PM
  5. 2 part piece here. One part counter of up and down, fill in of blank cells.
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2012, 10:09 PM
  6. Find Part number through Macro and output to associated part to certain cell
    By boylers75 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 04:32 PM
  7. Date and Time stap for Part In & Part Out
    By crystal2000a in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2012, 10:36 AM

Tags for this Thread

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