+ Reply to Thread
Results 1 to 6 of 6

COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

    Hello Excel Gurus,

    As per screenshot,

    I have a user input where I'd like to count the [Type] within that quarter.

    The quarters are dynamic array spill range returns (G7:P7), where it returns the number of quarters (input on cell H1), based from the starting point (another input on cell F7).

    And I need to keep it this way, where the spill range from G7 onwards (across the columns) based on the input on cell H1 and F7.

    Given that I have the quarters spilled, now I need to get the counts based on [Type] (user input cell H3:I3) in that quarter.

    i.e. Sep 2022, is the quarter for the date Jul 1, 2022 to Sep 30, 2022. And based on [Type] = A or C, we only have 2 dates that lies in that quarter (highlight in yellow).

    May I know how do I get the spill range count of it.

    Currently, this is the formula that I have, which isn't working.

    Please Login or Register  to view this content.
    COUNT Dynamic Array based on Date Range as in Quarters.png
    Last edited by dluhut; 05-05-2022 at 07:06 PM.

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

    Re: COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

    Please try

    =COUNTIFS(tblDummy[Date],"<="&G7#,tblDummy[Date],">"&EOMONTH(+G7#,-3))

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =COUNTIFS(tblDummy[Date],"<="&G7#,tblDummy[Date],">"&EOMONTH(+G7#,-3))
    Thanks Bo_Ry!

    I'd realized that my screenshot didn't take the [Type] into consideration.

    I'd use the COUNTIFS formula and try to add more criteria

  4. #4
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

    Just checked that the COUNTIFS formula doesn't work when it takes multiple OR values of the [Type]

    Any experts able to help with my problem?

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

    Re: COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

    Try

    =MMULT(COLUMN(H3:I3)^0,COUNTIFS(tblDummy[Date],"<="&G7#,tblDummy[Date],">"&EOMONTH(+G7#,-3),tblDummy[Type],TRANSPOSE(H3:I3)))

    or
    =COUNTIFS(tblDummy[Date],"<="&G7#,tblDummy[Date],">"&EOMONTH(+G7#,-3),tblDummy[Type],H3)
    +COUNTIFS(tblDummy[Date],"<="&G7#,tblDummy[Date],">"&EOMONTH(+G7#,-3),tblDummy[Type],I3)

  6. #6
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: COUNT Dynamic Array based on Date to return Dynamic Array Spill Range

    Solved!

    Reps up to you Bo_Ry.

    What's with the ^0?

+ 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. Array formula to sort another dynamic range based on appearances
    By JuerdMispelblomBeyer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2022, 08:54 AM
  2. [SOLVED] Dynamic Array Spill and Sort into 2 Columns
    By philchi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-03-2021, 04:54 PM
  3. XLOOKUP with a dynamic return array
    By phrankndonna in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-04-2020, 09:33 AM
  4. [SOLVED] Dynamic Date Range condition Array Formula
    By roven.aravind in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-26-2020, 04:23 AM
  5. [SOLVED] Populate Dynamic Array from Cell Values and write to Dynamic Range
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2018, 09:09 AM
  6. [SOLVED] Dynamic Changing Data, Based on Criteria Store in Array, Sum array and store in Cell
    By penbeacho in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-28-2015, 10:31 AM
  7. [SOLVED] Dynamic Count and Sum Array Formulas Based on Multiple Conditions
    By 5150 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-27-2014, 04:35 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