+ Reply to Thread
Results 1 to 3 of 3

Counting cells that contain a certain number since last instance of another number

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    cluj
    MS-Off Ver
    Excel 2007
    Posts
    2

    Counting cells that contain a certain number since last instance of another number

    Hello everyone!

    I need help with the following problem. In the column A, I have 4 different values. I need a formula that will count the number of appearances of the value 0 since the last time the value 39 has appeared. Values 19 and 20 are not important, but they have to be there. Basically it counts the number of times the lowest value in the column A has appeared since the last appearance of the greatest value in the same column. The formula will be put in column B and will have to show the results below.
    Is it possible?
    Thanks in advance!

    Column A
    39
    19
    20
    0
    20
    19
    19
    19
    0
    39
    19
    0
    39
    19
    39
    0
    0
    0
    19
    39
    20
    0
    20


    Column B
    0
    0
    0
    1
    1
    1
    1
    1
    2
    0
    0
    1
    0
    0
    0
    1
    2
    3
    3
    0
    0
    1
    1

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Counting cells that contain a certain number since last instance of another number

    Place a 0 in cell B1, and this formula in cell B2:

    Please Login or Register  to view this content.
    Copy the formula down as required.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    cluj
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Counting cells that contain a certain number since last instance of another number

    Wow! Amazing. It works just perfect. I was not sure this was even possible, but now it does not even seem that complicated, although I have no idea how you came up with this formula. Anyway..thank you very 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. Counting the number of matched cells and adding it to a different number...
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2015, 02:51 PM
  2. Counting number of cells with a value
    By Saturn in forum Excel General
    Replies: 2
    Last Post: 10-04-2011, 11:26 AM
  3. Counting number of non-zero cells in a row
    By lovi in forum Excel General
    Replies: 4
    Last Post: 09-06-2011, 03:24 PM
  4. counting number of cells with same number
    By charlie44 in forum Excel General
    Replies: 9
    Last Post: 01-05-2007, 01:24 PM
  5. Counting the Number of Cells Containing
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 05:44 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