+ Reply to Thread
Results 1 to 3 of 3

Count "YES" in B1:B8, C1:C8, etc when corresponding A="DETROIT"

  1. #1
    Registered User
    Join Date
    07-18-2013
    Location
    Michigan, UsA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Count "YES" in B1:B8, C1:C8, etc when corresponding A="DETROIT"

    A1: DETROIT B1: YES C1: YES
    A2: DETROIT B2: NO C2: YES
    A3: PHOENIX B3: YES C3: NO
    A4: PHOENIX B4: NO C4: YES
    A5: DETROIT B5: YES C5: NO
    A6: DETROIT B6: YES C6: YES
    A7: DETROIT B7: NO C7: YES
    A8: PHOENIX B8: YES C8: NO
    Would like to measure:
    1. Number of "YES" in column B when the corresponding A = "DETROIT"
    2. Number of "YES" in column B when the corresponding A = "PHOENIX"
    3. Number of "YES" in column C when the corresponding A = "DETROIT"
    4. Number of "YES" in column C when the corresponding A = "PHOENIX"

    So I would like my results to show:
    DETROIT (YES) 3 4
    PHOENIX (YES) 2 1

    I would then concatenate the results into the following:
    • DETROIT had 3/5 (60%) YES in column B
    • DETROIT had 4/5 (80%) YES in column C
    • PHOENIX had 2/3 (66%) YES in column B
    • PHOENIX had 1/3 (33%) YES in column C

    My actual table has 12 columns of YES/NO and will probably expand further - so I'm hoping there is a way to calculate the data with a single formula rather than adding "invisible" columns to the side and calculating the results on a cell-by-cell basis.

    Thanks for any assistance you can offer!!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Count "YES" in B1:B8, C1:C8, etc when corresponding A="DETROIT"

    =SUMPRODUCT((A1:A8="DETROIT")*(B1:B8="Yes"))
    =SUMPRODUCT((A1:A8="DETROIT")*(C1:C8="Yes"))
    =SUMPRODUCT((A1:A8="PHOENIX")*(B1:B8="Yes"))
    =SUMPRODUCT((A1:A8="PHOENIX")*(C1:C8="Yes"))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    07-18-2013
    Location
    Michigan, UsA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Count "YES" in B1:B8, C1:C8, etc when corresponding A="DETROIT"

    Special-K, that works great. Thank you very much for your assistance! First time I've used that particular function!!

    Cheers,
    Dave

+ 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. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  2. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  3. Replies: 1
    Last Post: 07-16-2010, 02:44 AM
  4. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 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