+ Reply to Thread
Results 1 to 3 of 3

need to add an OR statement if the first three choices aren't validated

  1. #1
    Registered User
    Join Date
    07-25-2015
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    22

    need to add an OR statement if the first three choices aren't validated

    A while back excelliot helped me with the following formula...I'll just paste the formula verbatim:

    =IF(COUNTIF(Sheet1!A:A,"myvalue122")>0,"myvalue122",IF(COUNTIF(Sheet1!A:A,"myvalue123")>0,"myvalue1

    The data would theoretically contain only one of the three, however, in some cases, NONE of the three would be there, and instead some number of variations would occur (darn!). Despite the tedious nature of it, I would like to add in every other option that could be present IF those three were not it. In this case there could be more than one variation.

    Put another way, I might have, instead of the "Easy Button" choices above,

    one of these:
    Mydata454(B;B)
    Mydata454(B;C)
    Mydata454(C;C)

    as well as one of these:
    Mydata455(D;D)
    Mydata455(D;E)
    Mydata455(E;E)

    and so on.

    I would like to append the formula to say, "if the previous choices aren't found, add all of these others that apply".

    Thanks for any help!

    Suzanne

  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,638

    Re: need to add an OR statement if the first three choices aren't validated

    You haven't included all the formula but I would guess all you need is another COUNTIF for the third condition.

    For a specific tested solution, I would suggest that you post a sample workbook with some typical data identifying the expected solution for each option.


    Regards, TMS
    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
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: need to add an OR statement if the first three choices aren't validated

    Or perhaps a vlookup() into a table?

    upload your samplwe WB, and we can see what you need
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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, Then Statement With Three Choices
    By Recon231 in forum Excel General
    Replies: 3
    Last Post: 01-16-2015, 03:52 PM
  2. IF statement with multiple cell choices
    By danielhibbswoodings in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2014, 10:23 AM
  3. [SOLVED] If Statement to Return blank cell if 2 conditions aren't met?
    By karryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-05-2014, 12:46 PM
  4. If Statement with Choices
    By ktkreeger in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2013, 04:20 PM
  5. [SOLVED] IF Statement with Validated List as the "False" action
    By SymphonyTomorrow in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-18-2013, 02:48 PM
  6. [SOLVED] CREATE AN "IF' STATEMENT FOR CHOICES OF CHECK BOXES
    By pjb in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-08-2006, 04:10 PM
  7. Include several choices in an IF statement.
    By kevin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2005, 08: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