+ Reply to Thread
Results 1 to 4 of 4

If either condition is true (3 Or conditions)

  1. #1
    Registered User
    Join Date
    10-04-2008
    Location
    DC
    Posts
    1

    Smile If either condition is true (3 Or conditions)

    I have 3 cells in which I need all 3 conditions met. a1, a2 and a3. If a1 = 4 or 2 or 1 or 1 AND a2 = 4 or 2 or 1 AND a3 =4 or 2 or 1 then put "Yes421" in cell a4. If not met then put "No421" in cell a4

    How do I write this formula in Excel?

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi Helpinghand, and welcome to the forum,

    Try this formula in cell A4:

    =IF(AND(OR(A1=1,A1=2,A1=4),OR(A2=1,A2=2,A2=4),OR(A3=1,A3=2,A3=4)),"Yes421","No421")

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Here's one way

    =IF(SUM(COUNTIF(A1:A3,{1,2,4}))=3,"Yes421","No421")

  4. #4
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Here's another way...

    =IF(AND(OR(A1={1,2,4}),OR(A2={1,2,4}),OR(A3={1,2,4})),"Yes421","No421")

    Hope this helps!

+ 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. Macro/command button to reset all filters in pivot table
    By schueyisking in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-29-2008, 11:30 AM
  2. what do I type to specify to import from the folder that I just browsed for?
    By hluk in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-27-2008, 06:46 PM
  3. Speeding Up VBA Programming
    By pickledmuffin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-13-2008, 01:54 AM
  4. Checkbox Macro
    By Jonboy_100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2007, 09:47 AM
  5. Need help shortering my code with a loop
    By Loranga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2007, 03:06 AM

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