+ Reply to Thread
Results 1 to 10 of 10

Counting Multiple options

Hybrid View

BabyBandit82 Counting Multiple options 09-14-2016, 07:57 PM
MarvinP Re: Counting Multiple options 09-14-2016, 08:01 PM
sanram Re: Counting Multiple options 09-14-2016, 08:04 PM
sanram Re: Counting Multiple options 09-14-2016, 08:10 PM
chullan88 Re: Counting Multiple options 09-15-2016, 01:48 AM
sanram Re: Counting Multiple options 09-15-2016, 06:36 AM
Tony Valko Re: Counting Multiple options 09-14-2016, 08:36 PM
FlameRetired Re: Counting Multiple options 09-14-2016, 10:43 PM
BabyBandit82 Re: Counting Multiple options 09-15-2016, 06:02 PM
FlameRetired Re: Counting Multiple options 09-15-2016, 07:29 PM
  1. #1
    Registered User
    Join Date
    09-14-2016
    Location
    Winchester, KY
    MS-Off Ver
    365 Desktop
    Posts
    19

    Question Counting Multiple options

    So i have a worksheet that we use to track if an ad has deployed that week for each client we put an x if it deployed, more than once we put 2 x's.
    I need to count the total number of "x" and "xx" in a single row so far I have only figured out how to count a single "x" by using =COUNTIF(D3:AS3,"X") but i also need to include the "XX" and those need to have a value of 2.
    So single x=1, xx=2 sum of these does this make sense.

    Thanks for your help
    BabyBandit82

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,228

    Re: Counting Multiple options

    Hi BabyBandit and welcome to the forum

    How about

    =COUNTIF(D3:AS3,"X") + COUNTIF(D3:AS3,"XX")*2

    If you had spaces in front and after each set of X it might be easier?

    The first Countif will find all the "XX" in the range. If the above doesn't work how about..

    =COUNTIF(D3:AS3,"X") + COUNTIF(D3:AS3,"XX")
    Last edited by MarvinP; 09-14-2016 at 08:03 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Counting Multiple options

    You can simply use this :
    =COUNTIF(D3:AS3,"X")+COUNTIF(D3:AS3,"XX")*2
    Last edited by sanram; 09-14-2016 at 08:10 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Counting Multiple options

    Or you can try this too
    =SUMPRODUCT(LEN(D3:AS3)-LEN(SUBSTITUTE(D3:AS3,"X","")))

  5. #5
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    447

    Re: Counting Multiple options

    Quote Originally Posted by sanram View Post
    Or you can try this too
    =SUMPRODUCT(LEN(D3:AS3)-LEN(SUBSTITUTE(D3:AS3,"X","")))

    Hi,

    A small modification of sanram's formula works well

    ={SUM(LEN(D3:AS3)-LEN(SUBSTITUTE(D3:AS3,"x","")))}

    Entered as an array formula.

  6. #6
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Counting Multiple options

    Quote Originally Posted by chullan88 View Post
    Hi,

    A small modification of sanram's formula works well

    ={SUM(LEN(D3:AS3)-LEN(SUBSTITUTE(D3:AS3,"x","")))}

    Entered as an array formula.
    It is an array formula. But not mine. Didn't that
    =SUMPRODUCT(LEN(D3:AS3)-LEN(SUBSTITUTE(D3:AS3,"X","")))
    work?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Counting Multiple options

    Here's another one...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    2
    3
    8
    X
    X
    XX
    XXX
    XX
    X
    X
    4
    -----
    -----
    -----
    -----
    -----
    -----
    -----
    -----
    -----
    -----


    This formula entered in A3:

    =SUM(COUNTIF(D3:J3,{"x","xx"})*{1,2})
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Counting Multiple options

    I interpreted a little differently.

    Formula: copy to clipboard
    =COUNTIF(D3:J3,"x")+COUNTIF(D3:J3,"xx*")*2




    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    2
    3
    X
    X
    XX
    XXX
    XX
    X
    X
    10
    4
    Dave

  9. #9
    Registered User
    Join Date
    09-14-2016
    Location
    Winchester, KY
    MS-Off Ver
    365 Desktop
    Posts
    19

    Re: Counting Multiple options

    Thanks FlameRetired that worked you guys saved me a lot of time.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Counting Multiple options

    You're welcome. Glad to help, and thanks for the feedback.

+ 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: 0
    Last Post: 08-26-2014, 08:44 AM
  2. VBA - 1 pivot filter control multiple pivots with multiple field options
    By bwolsky in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2014, 06:19 PM
  3. [SOLVED] counting multiple options as 1
    By cherryt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-01-2013, 08:38 AM
  4. macro for counting with matching criteria of two different options
    By tarun9860 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2012, 09:54 PM
  5. Multi-Column Counting - COUNTA or other Options
    By argomike in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 01-28-2012, 03:54 PM
  6. Counting Multiple Options
    By johnlovesbeer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-06-2009, 11:38 AM
  7. counting list options
    By Tatsu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2008, 01:52 PM

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