+ Reply to Thread
Results 1 to 6 of 6

CountIF A1=X and B1=Y

  1. #1
    Registered User
    Join Date
    04-29-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Smile CountIF A1=X and B1=Y

    Hi, Experts. Thanks for taking a look.

    Each cell in Row 1 is filled with various numbers (cells A-Z) A1=1, B1=2, C1=3, D1=1, E1=2, F1=3, G1=4...Z1=5.

    Is it possible to count only those instances where 2 adjoinging cells = 1 and 2 (in a series)?

    ThanksAlot!

  2. #2
    Registered User
    Join Date
    06-24-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    45

    Re: CountIF A1=X and B1=Y

    Hello There,

    Please see attachment for the result. Hope your problem is resolved?

    Thank you!!
    Attached Files Attached Files

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,502

    Re: CountIF A1=X and B1=Y

    @Naren

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    13,365

    Re: CountIF A1=X and B1=Y

    A COUNTIFS() function can do this. =COUNTIFS(A1:Y1,1,B1:Z1,2) Note how the two criteria ranges are the same size but offset by one column.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    04-29-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: CountIF A1=X and B1=Y

    Narin, Thank you for your reply. Yours, indeed, worked. My space was limited, so I had to go with another solution. Cheers!
    Last edited by ThanksAlot; 07-19-2019 at 01:37 PM.

  6. #6
    Registered User
    Join Date
    04-29-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: CountIF A1=X and B1=Y

    MrShorty, Thank you for your solution. It works perfectly. Many thanks. -Jon

+ 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. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  2. Replies: 8
    Last Post: 05-27-2017, 07:04 AM
  3. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  4. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  5. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  6. [SOLVED] COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  7. [SOLVED] Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 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