+ Reply to Thread
Results 1 to 15 of 15

Cannot find Max/Min/Average based on multiple criteria

  1. #1
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Cannot find Max/Min/Average based on multiple criteria

    Hello,

    I have been trying for several days to find the min, max, and average of ammonia levels in various ponds. I need the search to include those labelled "pond" and "duplicate" (they have different names in the actual data set). I have tried the following formula to no avail:

    =MINIFS(B13:DZ13,B9:DZ9,B9,B8:DZ8,E8)

    I suspect the issue comes from querying the same data range for two separate entities is causing the issue, despite separating (duplicating) it into "Sample ID" and "SampleID2" as the formula seems to work quite well if I change the second query to date rather than the original dat range again.
    Attached Files Attached Files
    Last edited by EXcelForumGuy; 01-05-2023 at 04:14 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    EITHER... you haven't told us something important... or you are overcomplicating this...
    Why not:
    =MIN(B13:E13)

    etc...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Re: Cannot find Max/Min/Average based on multiple criteria

    Sorry for leaving that out, I need this because the actual data set is far larger than what I included and I need to repeat this for 50 ponds with a data set that grows annually. The end goal is to create a sheet that would calculate these automatically without the need to manually select the data range for each pond. The pond names do not change year to year so thats why I am trying to have the formula query for the name of the pond (Pond and Duplicate in the dataset) the actual pond names are alphanumeric values delineating the watershed and ID within the watershed. thank you for the help, I hope this makes it clearer.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    Nope. Can you upload a more realistic sample sheet, if this isn't it:

    =LET(A,$13:$13,MIN(DROP(FILTER(A,A<>""),,1)))
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Re: Cannot find Max/Min/Average based on multiple criteria

    Thanks Glenn, let me try that formula out in my document then I will let you know. The issue with uploading a bigger workbook is that it contains a lot of doxxable/confidential information and It may take me a lot of time to scrub it completely. Either way I appreciate the help.

  6. #6
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Re: Cannot find Max/Min/Average based on multiple criteria

    Okay I have scrubbed the file and now it is ready to post. I need the formula to find the minimum amount of NH4 between Pond 1 with Duplicate 1, and the same formula to find the minimum between Pond 2 and duplicate 2, and the same for Pond 3 and Duplicate 3. Thanks again for all the help, let me know if there is anything else I should post.
    Attached Files Attached Files

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    Is that ONE number for minimum of P1/D1, ONE number for minimum of P2/D2, etc...

    or ONE number, overall?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    Also... minimum DETECTED amount (0.04) or <0.03 for Pond 2?

    Expected results would help!!

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    How should <0.03 be treated when calculating averages?

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

    Re: Cannot find Max/Min/Average based on multiple criteria

    I agree with Glenn an expected result would be nice. Also the text in with numbers creates problems.

    Not being as smart as Glenn

    min (minifs,minifs) would get you the minimum

    =min(MINIFS(B12:E12,B8:E8,D8),MINIFS(B12:E12,B8:E8,e8)) perhaps

  11. #11
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Re: Cannot find Max/Min/Average based on multiple criteria

    1 minimum for P1/D1; 1 minimum for P2/D2. Ive been instructed to find the minimum detected amount, and the treat the <0.03 as 0.03. I know it creates problems for averages but we have to assume its at the largest point.

  12. #12
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Re: Cannot find Max/Min/Average based on multiple criteria

    thank you, this is my first post. Still learning what is required for responders.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    Three formulae. They all resemble this one. See file.

    =LET(A,$B$8:$N$8,B,SUBSTITUTE($B$12:$N$12,"<","")+0,C,COUNTIF(A,$B15)+1,MIN(INDEX(B,,MATCH($B15,A,0)+SEQUENCE(C,,0))))

    copied down.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    01-04-2023
    Location
    Ontario,Canada
    MS-Off Ver
    office 365 (Newest)
    Posts
    7

    Re: Cannot find Max/Min/Average based on multiple criteria

    Thank you, I will mark this one solved. This helped me out immensely.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Cannot find Max/Min/Average based on multiple criteria

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] Find Out Average based on different criteria
    By SPAAARK in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-04-2021, 05:58 AM
  2. Replies: 14
    Last Post: 06-07-2021, 11:31 AM
  3. Find average of last 24 hrs data from a filtered range based on a criteria
    By styldude in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2017, 05:18 AM
  4. Replies: 1
    Last Post: 02-15-2016, 04:35 PM
  5. Trying to find median & average for multiple columns with multiple criteria
    By help-meplease in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2016, 06:59 PM
  6. [SOLVED] Need to find an average based on several criteria.
    By Crow47 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-22-2013, 06:14 PM
  7. [SOLVED] If any combinations of multiple criteria met, then find average time elapsed
    By Verdant in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2013, 01:57 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