+ Reply to Thread
Results 1 to 4 of 4

rewrite aggregate function

  1. #1
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    rewrite aggregate function

    Hi, I am working with this function, but I am struggling with the counting at the beginning of a new category.
    Please Login or Register  to view this content.
    In the red part the function is counting beginning from row 2, but I need him to count with 1 at the start of a new category.
    I was already playing with the number of occurences of the category, but I fail to see how to do it.
    Ideally it would be best if the category in column H is calculated too.

    Maybe someone has a (another) solution?

    In the added sheet I have an extract of a much bigger dataset


    Cheers
    Erwin
    Attached Files Attached Files
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: rewrite aggregate function

    How about
    =INDEX($C$2:$C$11,AGGREGATE(15,6,(ROW($B$2:$B$11)-ROW($B$2)+1)/(($A$2:$A$11=$G$2)*($B$2:$B$11=$H2)),COUNTIFS(H$2:H2,H2)))

  3. #3
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: rewrite aggregate function

    Thanks, this helps me from my headache!

    Cheers
    Erwin

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: rewrite aggregate function

    You're welcome & thanks for the feedback.

+ 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. aggregate function
    By jojo101 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-10-2020, 01:16 AM
  2. Aggregate function sum
    By barrenaj in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-16-2019, 12:27 PM
  3. [SOLVED] VBA Aggregate Function
    By Gregor y in forum Access Programming / VBA / Macros
    Replies: 9
    Last Post: 02-27-2017, 03:17 AM
  4. [SOLVED] AGGREGATE Function
    By chief_abound in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-03-2015, 12:48 AM
  5. [SOLVED] Rewrite a function to read a list from external file
    By smpita in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2014, 07:40 PM
  6. Aggregate Function
    By nav505 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2013, 03:20 AM
  7. [SOLVED] Function Ifcolorandtextthen or rewrite SUMifs with color as a criteria
    By Slowfish in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-18-2012, 11:36 AM

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