+ Reply to Thread
Results 1 to 4 of 4

Countif a cell equals "x" and cell above is "y"

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Countif a cell equals "x" and cell above is "y"

    Hi all,

    can anyone come up with an array formula which would count the occurancy of a word(or value) being below a specified word(or value)?

    For example count if "A" is below "C" in the following range:

    A
    B
    C
    A
    C
    A
    B
    C

    The result would equal 2 because "A" can be found twice directly under "C".

    Thanks!
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Countif a cell equals "x" and cell above is "y"

    Assume that the start cell of your data is A1 and A8 is the end cell, so your data is from A1:A8.

    In B1 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Countif a cell equals "x" and cell above is "y"

    Works like a charm Sixthsense! Thank you. Would you be able to guide me how to make it work with a formula like this?

    Please Login or Register  to view this content.
    Your version is "cleaner" obviously, but I'd like to grasp how to do those things with an array formula as well.

    Thanks!

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Countif a cell equals "x" and cell above is "y"

    Glad it helps you and thanks for the feedback and rep

    If you would like to convert it as array formula then make it like the below formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    * operates as AND operator in ARRAY FORMULA

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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