+ Reply to Thread
Results 1 to 10 of 10

IF(OR Formula with 4 criteria and 2 outcomes

  1. #1
    Registered User
    Join Date
    07-19-2016
    Location
    Colorado
    MS-Off Ver
    Microsoft Office 15
    Posts
    22

    IF(OR Formula with 4 criteria and 2 outcomes

    I Would like my formula to populate a report name in cell A1 from sheet 'Mil Pay'!A2 if any or even all weeks populate on my spreadsheet (from cells C4,D4,E4,F4) and to just be blank if none of the weeks populate.

    =IF(C4=W1,IF(D4=W2,IF(E4=W3,IF(F4=W4,('Mil Pay'!A2),""))))

    my current formula returns "FALSE". I have played around with it a bit and had partial success but cant seem to make a formula that works, If you need more information to help me please let me know. Thank you!
    Last edited by PsychicFish; 07-21-2016 at 07:09 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    Try it like this:

    =IF(OR(C4=W1,D4=W2,E4=W3,F4=W4),'Mil Pay'!A2,"")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-19-2016
    Location
    Colorado
    MS-Off Ver
    Microsoft Office 15
    Posts
    22

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    Thank you for the reply Pete but for some reason when none of the weeks populate in Cells C4:F4 cell A1 still has the report name in it and is not blank. Any ideas?

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    Try this ...

    =IF(OR(AND(C4<>"",C4=W1),AND(D4<>"",D4=W2),AND(E4<>"",E4=W3),AND(F4<>"",F4=W4)),'Mil Pay'!A2,"")

  5. #5
    Registered User
    Join Date
    07-19-2016
    Location
    Colorado
    MS-Off Ver
    Microsoft Office 15
    Posts
    22

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    Thank you for the post but it seems that formula will not populate the report name in A1, it just leaves the field blank no matter what does or doesn't populate in C4:F4, I tried tweaking it but couldn't find an answer. Please let me know if anyone has another solution

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    Can you attach a sample workbook?

  7. #7
    Registered User
    Join Date
    07-19-2016
    Location
    Colorado
    MS-Off Ver
    Microsoft Office 15
    Posts
    22

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    sample should be attached, there are multiple other sheets that interact with this one to populate the weeks based on the macros assigned to the button which are not included.
    Attached Files Attached Files

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    W1 and W2 etc. are text values, so you need to do it like this:

    =IF(OR(C4="W1",D4="W2",E4="W3",F4="W4"),'Mil Pay'!A2,"")

    Hope this helps.

    Pete

  9. #9
    Registered User
    Join Date
    07-08-2016
    Location
    USA
    MS-Off Ver
    Office 365, Office 2016 for PC & Mac, Office 2013, Office 2011 Mac
    Posts
    80

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    Hi Psychic,

    Not the prettiest formula, but this should work in b5.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    07-19-2016
    Location
    Colorado
    MS-Off Ver
    Microsoft Office 15
    Posts
    22

    Re: IF(OR Formula with 4 criteria and 2 outcomes

    dmg 2016 thank you! it works like a charm! thank you Pete and Phuocam for the help as well I really appreciate it!

+ 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. If or formula help for 3 possible outcomes
    By pembr0ke in forum Excel General
    Replies: 7
    Last Post: 02-08-2016, 07:41 AM
  2. Multiple criteria IF - Four possible outcomes
    By George Charlesworth in forum Excel General
    Replies: 1
    Last Post: 01-28-2015, 01:59 PM
  3. [SOLVED] IF Formula with 3 outcomes
    By adamheon in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2013, 10:13 AM
  4. Too many IFs, two criteria, and nine possible outcomes
    By fbrb99 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-10-2011, 09:50 AM
  5. If formula used for multiple outcomes
    By Scottiexcel in forum Excel General
    Replies: 1
    Last Post: 07-14-2009, 10:58 PM
  6. formula with 6 outcomes to return 4
    By excellentexcel in forum Excel General
    Replies: 3
    Last Post: 04-05-2009, 07:24 AM
  7. Replies: 1
    Last Post: 02-20-2006, 05:50 PM

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