+ Reply to Thread
Results 1 to 7 of 7

Two related columns count exception formula

  1. #1
    Registered User
    Join Date
    02-12-2014
    Location
    Essex, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Two related columns count exception formula

    I have two columns that are related.

    Essentially I have a column of keywords - some of these keywords are good leads some are bad.


    Screenshot.png

    in column D i have tagged each lead Y or N for yes or no - I want to be able to count how many of each keyword is a Yes or No.

    I hope that makes sense.

    Regards

    A

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Two related columns count exception formula

    For Y

    =COUNTIF(D:D,"Y")

    For N

    =COUNTIF(D:D,"N")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    02-12-2014
    Location
    Essex, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Two related columns count exception formula

    Thanks for the reply. I need to include the other column with the keywords in this, so it needs to have two exceptions I imagine it being something like:

    =CountIf (A:A, "Keyword A") & =CountIf (D:D "Y")

    So if i have a column of entries:

    A1 is 'Keyword A'
    A2 is 'Keyword A'
    A3 is 'Keyword B'

    I want to check Column D to see if it has a Y or an N

    D1 is 'Y'
    D2 is 'N'
    D3 is 'Y'

    And from this i can generate totals like:

    Keyword: Total yes Total No
    Keyword A - 23 10
    Keyword B - 11 9

    Etc.

    hope that helps, sorry if im not to clear im new to this. I really appreciate your help.

  4. #4
    Registered User
    Join Date
    02-12-2014
    Location
    Essex, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Two related columns count exception formula

    So essentially i want to detect which keyword is in column A and then detect if it is a Yes or a No

    I have attached a screenshot:

    screenshot 2.png

    Then I would ideally be able to figure out how many Yes or No's of each keyword I would have.

    thanks again

  5. #5
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Two related columns count exception formula

    Hi

    You can use the SUMPRODUCT function to achieve the result you are looking for.

    Attached is a sample file

    regards

    Jeff
    Attached Files Attached Files

  6. #6
    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,939

    Re: Two related columns count exception formula

    Hi and welcome to the forum

    For future reference, please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

    You can do this with countifS()
    A
    B
    C
    D
    E
    F
    G
    1
    K Lead Y N
    2
    K a y K a
    3
    0
    3
    K b n K b
    1
    1
    4
    K a y K c
    0
    1
    5
    K b y K d
    1
    1
    6
    K c n
    7
    K a y
    8
    K d n
    9
    K d y


    F2=COUNTIFS($A$2:$A$9,$E2,$D$2:$D$9,F$1) copied down and across
    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

  7. #7
    Registered User
    Join Date
    02-12-2014
    Location
    Essex, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Two related columns count exception formula

    Thanks this has been a great help! i will mark this as solved!

+ 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 do I take Multiple Rows with all columns Unique with the exception of 1 to 1 Row?
    By venusofathens in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2012, 04:09 PM
  2. Print a 15000 line list of 2 related columns in 4 columns per page.
    By jriver03 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-25-2012, 05:23 PM
  3. Sorting groups of columns to a related group of columns
    By fuadramsey in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-15-2007, 07:56 PM
  4. Count dollars in related cells
    By My View in forum Excel General
    Replies: 10
    Last Post: 08-20-2006, 07:35 AM
  5. [SOLVED] formula w exception
    By Micayla Bergen in forum Excel General
    Replies: 4
    Last Post: 05-18-2005, 12:01 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