+ Reply to Thread
Results 1 to 17 of 17

I am looking for a complex mean formula with multiple criteria in a time period

  1. #1
    Registered User
    Join Date
    10-10-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    31

    I am looking for a complex mean formula with multiple criteria in a time period

    Hi friends, I have a question.
    I have a table like the one attached. For example, the date is in column C, the unit in column D and the time in column E. Now I have a field in which I enter a date. And I now need a formula which shows me the mean value of the units up to this month. The problem is: I need the mean value of the months added up.
    I have in column J the units. On the basis of the field J5 and the date on H4 I would like as result: The average value (sum month 1 in the year 2022+sum month 2 in the year 2022....to the 31.05.2022 as it stands in the field H4).
    There will be more years in the list later. The average should always refer from the beginning of the year to the selected date in the total.
    Is something like this possible? I have now tried it with everything, but my Excel knowledge does not allow me to come up with the right formula. I would be really grateful for any suggestions for solutions!

    Attachment 800436
    Attached Files Attached Files
    Last edited by emorej; 10-28-2022 at 08:29 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: 5$ for the first correct Solution

    Administrative Note:

    You may NOT offer payment here on the free forum! The Commercial Services section is available if you wish to purchase points and pay for a solution.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: complex, mean+sumif+date

    Your new title is not what we need.

    Please use a sentence that explains what you are trying to do - NOT a collection of function names. When you have done this, please attach a sample workbook.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    That's better - thank you.

    There are instructions at the top of the page telling you how to attach your workbook.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    By workbook, I mean workbook, not a screenshot. Waiting ...

  6. #6
    Registered User
    Join Date
    10-10-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    31

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    Hi friends, I have a question.
    I have a table like the one attached. For example, the date is in column C, the unit in column D and the time in column E. Now I have a field in which I enter a date. And I now need a formula which shows me the mean value of the units up to this month. The problem is: I need the mean value of the months added up.
    I have in column J the units. On the basis of the field J5 and the date on H4 I would like as result: The average value (sum month 1 in the year 2022+sum month 2 in the year 2022....to the 31.05.2022 as it stands in the field H4).
    There will be more years in the list later. The average should always refer from the beginning of the year to the selected date in the total.
    Is something like this possible? I have now tried it with everything, but my Excel knowledge does not allow me to come up with the right formula. I would be really grateful for any suggestions for solutions!
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    You have not given any worked examples, but see if this works for you:

    =AVERAGE(FILTER(E5:E32,(C5:C32<=H4)*(ISNUMBER(MATCH(RIGHT(D5:D32,6),UNIQUE(RIGHT(J5:J9,6)),0)))))

    Auf Deutsch:

    =MITTELWERT(FILTER(E5:E32;(C5:C32<=H4)*(ISTZAHL(VERGLEICH(RECHTS(D5:D32;6);EINDEUTIG(RECHTS(J5:J9;6));0)))))

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Registered User
    Join Date
    10-10-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    31

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    I don't know why you keep picking on me all the time. I've acknowledged my mistake about the title, but the rest is fine. Besides, every helpful reply in my previous thread I thanked you nicer than anyone else. And I left a reputation there, too. I really don't know what else to do.

    Unfortunately, your formula doesn't help me either, since it doesn't add up the months as a total. Thanks anyway for your effort. Can I now open a new thread with the same topic? and nothing is solved here, then why should I mark the thread accordingly...

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    I am not 'picking on you' - I don't know what you mean, sorry.

    No, you can't open a new thread as you are not allowed duplicate threads here - see the forum rules.

    If the formula I suggested doesn't work, then please provide a version of your workbook with the results you are expecting mocked up, and someone will take another look.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    Maybe this is what you want:

    =AVERAGE(FILTER($E$5:$E$32,($C$5:$C$32<=$H$4)*(RIGHT($D$5:$D$32,6)=RIGHT(J5,6))))

    Or this, perhaps:

    =SUM(FILTER($E$5:$E$32,($C$5:$C$32<=$H$4)*(RIGHT($D$5:$D$32,6)=RIGHT(J5,6))))
    Attached Files Attached Files
    Last edited by AliGW; 10-14-2022 at 07:09 AM.

  12. #12
    Registered User
    Join Date
    10-10-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    31

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    thank you for your answers and your effort, unfortunately your formulas do not meet my requirements. I have now updated the excel where my desired result is located in column i.
    with kind regards
    Attached Files Attached Files

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    What is supposed to be in the cells showing a #REF! error?

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    Try this:

    =LET(i,INDEX(SUMIFS($E$4:$E$32,$D$4:$D$32,RIGHT($J5,6),$C$4:$C$32,"<="&$H$4,$C$4:$C$32,UNIQUE(FILTER($C$5:$C$32,$C$5:$C$32<=$H$4))),),AVERAGE(i))

    and this:

    =LET(i,INDEX(SUMIFS($E$4:$E$32,$D$4:$D$32,RIGHT($J11,6),$C$4:$C$32,"<="&$H$10,$C$4:$C$32,UNIQUE(FILTER($C$5:$C$32,$C$5:$C$32<=$H$10))),),AVERAGE(i))
    Attached Files Attached Files

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    It looks like you have seen this and looked at the file I attached.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

  16. #16
    Registered User
    Join Date
    10-10-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    31

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    Youve really solved my problem. Im impressed! Thank you very much. I saw it too late, i bought the correct one already, but thank you anyway!

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: I am looking for a complex mean formula with multiple criteria in a time period

    Glad to have helped.

+ 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. Help with complex DUE Date formula
    By Terri Earley in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2018, 09:09 PM
  2. [SOLVED] Complex date formula
    By MPatri in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-28-2016, 01:19 PM
  3. Adding a date range to an already complex index array forumla
    By jackifizzle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-05-2013, 11:50 AM
  4. More complex lookup formula help (sickness conditions)
    By burnsie in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-18-2013, 09:00 AM
  5. Replies: 0
    Last Post: 04-11-2013, 04:42 PM
  6. Formula Problem with count under conditions within date range
    By txt_mess in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2010, 11:04 AM
  7. Complex Date Formula
    By kermitforney in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2006, 09:20 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