+ Reply to Thread
Results 1 to 5 of 5

Running count of items in a column performed with a dynamic array formula

  1. #1
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Running count of items in a column performed with a dynamic array formula

    Hi,

    I have a table in A1:B20 where I perform a running count of each item in column A with this trusted old formula copied down from cell B2:

    Please Login or Register  to view this content.
    This formula works fine, but I am looking for an alternative which does the exact same thing, but as an array formula which spills the values from B2 and downwards and expands dynamically with the number of values in column A. The values in column A will come from a dynamic array formula itself, spilling the values from cell A2 and downwards. Can this be done?


    Noble Gases Running count
    Neon (Ne) 1
    Argon (Ar) 1
    Krypton (Kr) 1
    Krypton (Kr) 2
    Argon (Ar) 2
    Xenon (Xe) 1
    Neon (Ne) 2
    Argon (Ar) 3
    Argon (Ar) 4
    Neon (Ne) 3
    Helium (He) 1
    Krypton (Kr) 3
    Argon (Ar) 5
    Argon (Ar) 6
    Krypton (Kr) 4
    Krypton (Kr) 5
    Krypton (Kr) 6
    Radon (Rn) 1
    Argon (Ar) 7

    Best regards,
    Marbleking
    Last edited by Marbleking; 08-17-2020 at 01:29 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Running count of items in a column performed with a dynamic array formula

    Make a table of your data.

    If this is not the solution your after, post an excel file, so we can test it.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Running count of items in a column performed with a dynamic array formula

    Quote Originally Posted by oeldere View Post
    Make a table of your data.

    If this is not the solution your after, post an excel file, so we can test it.
    Ok, done! Please see original post. Regards, Marbleking

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Running count of items in a column performed with a dynamic array formula

    Please try

    =MMULT((A2:A20=TRANSPOSE(A2:A20))*(SEQUENCE(ROWS(A2:A20))>=SEQUENCE(,ROWS(A2:A20))),SEQUENCE(ROWS(A2:A20))^0)

    or
    =MMULT((A2:A20=TRANSPOSE(A2:A20))*(ROW(A2:A20)>=TRANSPOSE(ROW(A2:A20))),ROW(A2:A20)^0)
    Attached Files Attached Files
    Last edited by Bo_Ry; 08-17-2020 at 01:37 PM.

  5. #5
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Running count of items in a column performed with a dynamic array formula

    Wow, that was quick, @Bo_Ry! It's perfect, thank you so much. Regards, Marbleking

+ 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. [SOLVED] Dynamic Array - one too many items
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2016, 06:58 AM
  2. [SOLVED] If then type formula to extract/count items in a column
    By karlcr9911 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-04-2012, 11:08 AM
  3. Replies: 8
    Last Post: 06-27-2012, 03:47 PM
  4. Replies: 10
    Last Post: 01-21-2012, 06:03 AM
  5. Replies: 7
    Last Post: 04-16-2009, 01:03 PM
  6. RE: How do I set up a formula to count only unique items in a column?
    By jennifer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-26-2006, 07:10 PM
  7. [SOLVED] How do I set up a formula to count only unique items in a column?
    By LYLERR in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2006, 07:10 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