+ Reply to Thread
Results 1 to 3 of 3

COUNTIF one of three choices

  1. #1
    Registered User
    Join Date
    12-29-2009
    Location
    Lilburn, Ga.
    MS-Off Ver
    Excel 2010
    Posts
    3

    COUNTIF one of three choices

    (Excel 2003) Using countif with a range, the formula must count the number of times each cell in the range contains either of three choices. There will be times when someone may input all three of the choices in a cell, and I need it to count only "one" of the three. If a cell within the range contains one of the three, the count of that cell = "1". If a cell within the range contains all three of the three choices, the count for that cell is still = "1". The following countif statement is the best I have come up with so far, but unfortunately it doesn't count only one of the three, but ends up with the count of "3" if all three choices are listed in the cell:

    =SUM(COUNTIF(1C:3C,{"*OJI*","*light*","*duty*"}))

    cell 1C = OJI, on light duty
    cell 2C = light duty
    cell 3C = OJI

    The formula above will return a value of "6", I need it to count "3", "1" for each cell.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: COUNTIF one of three choices

    Hi,

    Here's one way:

    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: COUNTIF one of three choices

    Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.

    As you are quite new, I will do it for you this time. Please have a look at forum rules

+ 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