+ Reply to Thread
Results 1 to 4 of 4

Frequency sum depending on criteria not working when criteria is between dates

  1. #1
    Registered User
    Join Date
    12-02-2019
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    3

    Frequency sum depending on criteria not working when criteria is between dates

    Hello, I actually figured this out whilst posting this so thought I'd stick it up anyway so people can see the solution in the future.

    Here is the formula I'm working with:
    {=SUM(IF(FREQUENCY(IF(EventbriteLeads!D2:D999999<>"",IF(AND(EventbriteLeads!E2:E999999>=Statistics!$B$15,EventbriteLeads!E2:E999999<=Statistics!$D$15), MATCH(EventbriteLeads!D2:D999999,EventbriteLeads!D2:D999999,0))),ROW(EventbriteLeads!D2:D999999)-ROW(EventbriteLeads!D2)+1),1))}

    The objective is to count the number of distinct unique values (EventbriteLeads!D2:D999999) that are not blank (EventbriteLeads!D2:D999999<>"") and fall between two dates (IF(AND(EventbriteLeads!E2:E999999>=Statistics!$B$15,EventbriteLeads!E2:E999999<=Statistics!$D$15)......Statistics!$B$15 and $D$15 being the dates to search between.

    I've used the same formula before except with only 1 criteria and it has worked. As soon as I add the AND statement in, returns nothing. The dates are correctly formatted and when I trade it for other possible AND statements it still doesn't work. Here is the one that has worked below:

    =SUM(IF(FREQUENCY(IF(EventbriteLeads!D2:D999999<>"",IF(EventbriteLeads!K2:K999999="Yes", MATCH(EventbriteLeads!D2:D999999,EventbriteLeads!D2:D999999,0))),ROW(EventbriteLeads!D2:D999999)-ROW(EventbriteLeads!D2)+1),1))

    THE FIX

    {=SUM(IF(FREQUENCY(IF(EventbriteLeads!D2:D999999<>"",IF(EventbriteLeads!E2:E999999>=Statistics!$B$15, IF(EventbriteLeads!E2:E999999<=Statistics!$D$15, MATCH(EventbriteLeads!D2:D999999,EventbriteLeads!D2:D999999,0)))),ROW(EventbriteLeads!D2:D999999)-ROW(EventbriteLeads!D2)+1),1))}

    They need to be separate IF statements

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Frequency sum depending on criteria not working when criteria is between dates

    Or I think you can multiply them together
    {=SUM(IF(FREQUENCY(IF(EventbriteLeads!D2:D999999<>"",IF((EventbriteLeads!E2:E999999>=Statistics!$B$15)*(EventbriteLeads!E2:E999999<=Statistics!$D$15), MATCH(EventbriteLeads!D2:D999999,EventbriteLeads!D2:D999999,0))),ROW(EventbriteLeads!D2:D999999)-ROW(EventbriteLeads!D2)+1),1))}

  3. #3
    Registered User
    Join Date
    12-02-2019
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Frequency sum depending on criteria not working when criteria is between dates

    Yes! Thanks Davsth, makes the formula tidier.

    My next objective is trying to figure out how to do similarly, but of the unique (EventbriteLeads!D2:D999999<>"",IF((EventbriteLeads!E2:E999999>=Statistics!$B$15)*(EventbriteLeads!E2:E999999<=Statistics!$D$15), see how many do not match in column EventbriteLeads!D2:D999999 with dates that are before Statistics!$B$15...

    So that I can see within that date range, how many are absolutely fresh leads and not ones that have previously been encountered outside of the selected date range.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,960

    Re: Frequency sum depending on criteria not working when criteria is between dates

    Hello Corgrash and Welcome to Excel Forum.
    We may be better able to help if you follow the instructions in the yellow banner at the top of the page that begins: "Corgrash Fast answers need clear examples..."
    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.

+ 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. Single Criteria Index Match with concatenated criteria NOT WORKING
    By hassanleo1987 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 04-26-2017, 12:28 AM
  2. Replies: 5
    Last Post: 03-30-2016, 06:01 AM
  3. Entering Calculated Dates depending on Frequency
    By adit123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2014, 05:17 PM
  4. Return dates that match a single criteria (a countif criteria)
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2014, 12:43 PM
  5. Excel formulas calculate working hours bet two dates with criteria
    By breadwinner in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-02-2013, 01:28 AM
  6. Frequency of two criteria
    By Smint in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2007, 12:22 PM
  7. frequency formula with criteria
    By seanc in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-13-2005, 06:25 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