+ Reply to Thread
Results 1 to 3 of 3

Count if/ Count/ IF two columns if adjacent column = value, countif on other column

  1. #1
    Registered User
    Join Date
    07-19-2017
    Location
    united states
    MS-Off Ver
    2007
    Posts
    31

    Count if/ Count/ IF two columns if adjacent column = value, countif on other column

    Hi.
    I currently have a set of Data that has a number in one column, and a set of text in the column adjacent to it.


    I have attached an example to this post...
    I would like a function/formula to basically say IF( Col A = 1 then COUNT( number of times "cat" occurs.
    My real file has numbers 1 - 12, and a around 15 different text entries, all the formulas I have tried have resulted in it counting whatever "text" i enter for the entire column.

    So as a result to the example,
    number 1 : cat=2, cow =1, dog =3
    number 2 : cow =1
    number 3 : cat =2, dog =1
    number 4 : dog =2

    I hope I have made sense of this to you! Thank you for any help you can provide!! If you need any more info or explanation I can try to be more helpful.
    Thanks again!

    Note: I also need this to work for the entire column i.e. Col A2:A2300 because these entries are added to everyday.
    Attached Files Attached Files

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Count if/ Count/ IF two columns if adjacent column = value, countif on other colum

    Hi,

    How about these formulae for numbers 1 and 2

    =COUNTIFS($A$2:$A$27,1,$B$2:$B$27,"cat")
    =COUNTIFS($A$2:$A$27,1,$B$2:$B$27,"cow")
    =COUNTIFS($A$2:$A$27,1,$B$2:$B$27,"dog")
    =COUNTIFS($A$2:$A$27,2,$B$2:$B$27,"cat")
    =COUNTIFS($A$2:$A$27,2,$B$2:$B$27,"cow")
    =COUNTIFS($A$2:$A$27,2,$B$2:$B$27,"dog")
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    07-19-2017
    Location
    united states
    MS-Off Ver
    2007
    Posts
    31

    Re: Count if/ Count/ IF two columns if adjacent column = value, countif on other colum

    Perfect.
    Thanks so much.

+ 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: 3
    Last Post: 12-16-2015, 05:56 PM
  2. Count column value then adjacent column cell fill color
    By MIGARDEIN in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-09-2015, 01:13 AM
  3. Replies: 1
    Last Post: 11-05-2013, 07:58 PM
  4. [SOLVED] Count Unique Values in a Column that are not in adjacent Column
    By sskgintl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2013, 03:18 PM
  5. Replies: 4
    Last Post: 10-21-2010, 11:05 AM
  6. Replies: 0
    Last Post: 03-09-2005, 06:47 AM
  7. Using COUNTIF to count column entries if adjacent column contains data
    By johnfullerroot in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2005, 05:43 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