+ Reply to Thread
Results 1 to 7 of 7

Counting cells, based on value

  1. #1
    Registered User
    Join Date
    05-16-2018
    Location
    Burlington, VT
    MS-Off Ver
    2010
    Posts
    8

    Counting cells, based on value

    Thank you for reading. I hope you can help me find solution to this problem: I have numbers in column A - A1:3, A2:5, A3:4, etc. I need excel to count the cells below, based on the value and drop the next value down and so on. In other words, I need the result to be: Value 3 is still in cell A1, but A2 & A3 are blank. Value 5 now is in cell A4 and value 4 is in the cell A9. If there would be another value, it would be in cell A13. Please, see attached example to better understand.
    I tried some formulas and functions but nothing worked.
    Thank you very much!
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,362

    Re: Counting cells, based on value

    Y used formula and conditional format to hidden numbers, hope this helps
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Counting cells, based on value

    In C2

    =$A$2

    In C3 then drag down

    =IFERROR(IF(ROWS($C$3:$C3)=SUM($C$2:$C2),INDEX($A$2:$A$5,1+COUNT($C$2:$C2)),""),"")
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    05-16-2018
    Location
    Burlington, VT
    MS-Off Ver
    2010
    Posts
    8

    Re: Counting cells, based on value

    Thank you so much guys. I'll try it on the spreadsheet with more values and let you know how it goes. Much appreciated!

  5. #5
    Registered User
    Join Date
    05-16-2018
    Location
    Burlington, VT
    MS-Off Ver
    2010
    Posts
    8

    Re: Counting cells, based on value

    I used this formula multiple times now, on many different spreadsheets, adjusting to each set of data. It works magic, again, thank you. I'm trying to understand: what is the "1+ COUNT" meaning.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,524

    Re: Counting cells, based on value

    A good way to find out what a formula, or part thereof in this case, is doing is to select a cell containing the formula, say C10, and run the Evaluate Formula feature. If you do you'll see that the COUNT function counts how many numbers are already in column C then 1+ increments that count so that the INDEX function retrieves the next (3rd) number from the range A2:A5
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Counting cells, based on value

    If satisfied pl mark the thread 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. Counting new cells based on text value
    By thejasonblankenship in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-13-2017, 06:19 PM
  2. Replies: 4
    Last Post: 06-13-2014, 07:08 PM
  3. [SOLVED] Counting number based on cells that have value
    By Drayde in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-19-2014, 02:45 PM
  4. Counting cells based on values of adjacent cells
    By SpookyAlienX in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-26-2013, 08:20 PM
  5. Counting Cells based on other cell value
    By rkemmerich in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-25-2013, 10:50 PM
  6. Counting based on other cells
    By acvitanov in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-14-2012, 11:31 AM
  7. Complicated counting of cells (based on other cells contents)
    By George in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-07-2005, 02:45 PM

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