+ Reply to Thread
Results 1 to 45 of 45

How to set Min, Max and Average for a range if the cells is number

  1. #1
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    How to set Min, Max and Average for a range if the cells is number

    Hi Gurus,
    How to set Min, Max and Average for a range but only count on those cells with numbers without consider #N/A or any non number character?
    min, max,average.JPG
    Last edited by SiewLee_81; 07-17-2019 at 11:21 PM.

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    You can use the standard functions in Excel if you replace the #N/A error messages with a blank.

    =IFNA(your_formula,"")

    Then simply:

    =MIN(B2:D2)
    =MAX(B2:D2)
    =AVERAGE(B2:D2)
    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 Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: How to set Min, Max and Average for a range if the cells is number

    or try below formula
    e2=AGGREGATE(5,6,B2:D2)
    f2=AGGREGATE(4,6,B2:D2)
    g2=AGGREGATE(1,6,B2:D2)
    try the above, copy and paste towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    Or without replacing the #N/A errors.

    Min =AGGREGATE(15,6,B2:D2,1)
    Max =AGGREGATE(14,6,B2:D2,1)
    Average =AVERAGEIF(B2:D2,"<>#N/A",B2:D2)

  6. #6
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Hi Ali,
    Yes, I got think at this way but I wish to have 1 formula because I don't have extra column in my report. May I know how to combine this 2 formula into 1 line?

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by :) Sixthsense :) View Post
    Please Login or Register  to view this content.
    Where did the OP ask for a sum???

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by SiewLee_81 View Post
    Hi Ali,
    Yes, I got think at this way but I wish to have 1 formula because I don't have extra column in my report. May I know how to combine this 2 formula into 1 line?
    You don't need an extra column.

    REPLACE the formulae in B2 to D4 with this:

    =IFNA(your_formula,"")

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by AliGW View Post
    Where did the OP ask for a sum???
    Hm... Then replace Sumif() with Countif(), AverageIf() etc.,

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Better to answer the question directly, don't you think?

  11. #11
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Yes..i tried but the result is blank
    =IFNA(MIN(B2:D2),"")
    Attachment 632723

  12. #12
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    SiewLee - if you want to attach your workbook, I can advise you better about updating current formulae to simplify your tasks.

    What you have just done is not what I suggested!!!

    Please attach the workbook.

  13. #13
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Hi Samba,
    Thanks and can you explain to me the coding meaning?
    5,6
    4,6
    1,6

  14. #14
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by :) Sixthsense :) View Post
    Hm... Then replace Sumif() with Countif(), AverageIf() etc.,
    The OP asked for min and max, minifs and maxifs are not supported in excel 2016.

  15. #15
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Hi Ali,
    Where I can attached my working file? I dont find an attachment icon to add in

  16. #16
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by jason.b75 View Post
    The OP asked for min and max, minifs and maxifs are not supported in excel 2016.
    Below formula's supported in lower version of Excel too..

    Array Formula's - Requires CTRL+SHIFT+ENTER

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Do you need any other variation?

  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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  18. #18
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    Why don't you try some of the other suggestions first? When you see that they work, then you would realise that you don't need to attach the file!

    The codes in Samba's formula are all explained in detail in excel's built in help.

  19. #19
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by :) Sixthsense :) View Post
    Do you need any other variation?
    You will need to explain to the OP how to enter these as array-entered formulae.

  20. #20
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by AliGW View Post
    You will need to explain to the OP how to enter these as array-entered formulae.

  21. #21
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    hi Jason,
    Thanks for your input and Samba's way is work but I wish to study more way from other expert.

  22. #22
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by :) Sixthsense :) View Post
    What does this mean? I hope you are not suggesting that anybody posting here should know that already. Please remember that many (most?) or our members are novices.

  23. #23
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by SiewLee_81 View Post
    Thanks for your input and Samba's way is work but I wish to study more way from other expert.
    Add more emoticon's, since I need a clap emoticon in this situation

  24. #24
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    When you see that they work, then you would realise that you don't need to attach the file!
    Yes, they do work, Jason, absolutely!

    However, I am trying to help the OP to refine their workbook so that workarounds to deal with error messages aren't necessary. If the OP wishes to take me up on this, that's their decision. If they don't, that's fine, too.

  25. #25
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by AliGW View Post
    What does this mean?
    It means I am afraid, because explaining something in words in step by step in which I am not comfortable

    Quote Originally Posted by AliGW View Post
    I hope you are not suggesting that anybody posting here should know that already.
    That formula's are given for jason.b75 and I think he is not a novice

    Quote Originally Posted by AliGW View Post
    Please remember that many (most?) or our members are novices.
    I can answer questions but I cannot take classes about how to work with excel

  26. #26
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Sixthsense - you can use the array formula canned message.

  27. #27
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by :) Sixthsense :) View Post
    That formula's are given for jason.b75 and I think he is not a novice
    Gee, thanks. You could have at least given me some good ones. Your formulas look like they were written by a novice, anyone who knows their stuff would leave the false arguments empty!

  28. #28
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    SiewLee - are you OK uploading the workbook? I posted instructions in post #17.

  29. #29
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by jason.b75 View Post
    Your formulas look like they were written by a novice, anyone who knows their stuff would leave the false arguments empty!
    =MIN(IF(ISNUMBER(A1:C1),A1:C1,9^9))

    Assume the values are like 45, 500, 300 800.

    What will be the result if we leave the last argument as empty? It will result 0. So the Min() will also return the minimum value as 0. But 45 is the minimum value in the given example.

    Who is the novice? You Decide.

    Negative Rep.bmp
    Last edited by :) Sixthsense :); 07-17-2019 at 06:07 AM.

  30. #30
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Gentleman - please take this argument away from this thread - it isn't helping the OP in the slightest. Thank you.

  31. #31
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by AliGW View Post
    Gentleman - please take this argument away from this thread - it isn't helping the OP in the slightest. Thank you.
    I just given my explanation based on the criticism raised in my given formula solution. I have not discussed anything which is not related to this thread.

    Hope you understand

  32. #32
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by :) Sixthsense :) View Post
    Who is the novice? You Decide.
    How do you fit 45, 500, 300, 800 (4 values) into A1:C1 (3 cells).
    Arrays that don't fit aside, with the last argument empty, the formula would return the correct MIN value of 45, not 0 as you say.
    The only time it would return 0 with the last argument left empty would be if all of the cells were empty, or if the actual min value was 0. Yours would return 387420489 if all cells were empty.
    Similarly, your MAX formula would incorrectly return 0 if there were no positive values in the data source, where leaving the last argument empty would return the correct result.
    Quote Originally Posted by :) Sixthsense :) View Post
    Who is the novice? You Decide.
    Decision made

  33. #33
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Jason & Sixthsense

    The personal attacks on each other (name-calling) are UNACCEPTABLE. If this spat continues, infractions will be served on both sides. You have been warned.

  34. #34
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by jason.b75 View Post
    Arrays that don't fit aside, with the last argument empty, the formula would return the correct MIN value of 45, not 0 as you say.
    Thanks for the correction

  35. #35
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    I haven't seen any name calling, Ali! Merely a debate on skill level.

  36. #36
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    Between you, you seem to have have managed to drive the OP away.

    The purpose of this thread is to provide the OP with a solution, not debate each other's skill levels. No more such discussions here, please - take it to PM if you wish to continue.

  37. #37
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by AliGW View Post
    SiewLee - are you OK uploading the workbook? I posted instructions in post #17.
    Yes. I am having to attach file. I manged to find the "attachment" icon but can proceed to browse my file
    Untitled.jpg

  38. #38
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by SiewLee_81 View Post
    Yes. I am having to attach file. I manged to find the "attachment" icon but can proceed to browse my file
    Attachment 632756
    Can anyone advise the next step to make sure my attachment uploaded because I can't find button to post it.
    Attachment 632761

  39. #39
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to set Min, Max and Average for a range if the cells is number

    The icon doesn't work, you need to click the 'Go Advanced' button in the bottom right corner of the reply box (which it looks like you have done in that image), then scroll down and look for the text link that says 'Manage Attachments' which will be on the left and lower down the screen.

  40. #40
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Quote Originally Posted by jason.b75 View Post
    The icon doesn't work, you need to click the 'Go Advanced' button in the bottom right corner of the reply box (which it looks like you have done in that image), then scroll down and look for the text link that says 'Manage Attachments' which will be on the left and lower down the screen.
    yes..i use the go advanced, managed attachments. what is then ext steps after I upload my excel file? I don't see any "submit" button.
    Attachment 632769

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

    Re: How to set Min, Max and Average for a range if the cells is number

    Take a look here, formulae similar to those guiven by Jason a couple (or more!!) of screenfulls ago.
    Attached Files Attached Files
    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

  42. #42
    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. 2407 (Windows 11 23H2 64-bit)
    Posts
    82,864

    Re: How to set Min, Max and Average for a range if the cells is number

    ... I upload my excel file? I don't see any "submit" button.
    After uploading, it's close and save reply.

  43. #43
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    after uploading, I click the "close this window". Not sure the attachment successfully post or not?
    min,max,average formula.xlsx

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

    Re: How to set Min, Max and Average for a range if the cells is number

    Please try

    E2
    =AGGREGATE(5,6,$B2:$D2)
    F2
    =AGGREGATE(4,6,$B2:$D2)
    G2
    =AGGREGATE(1,6,$B2:$D2)
    Attached Files Attached Files

  45. #45
    Registered User
    Join Date
    11-21-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    27

    Re: How to set Min, Max and Average for a range if the cells is number

    Hi all Experts,
    Thank you so much and my issue settled. I will 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. Replies: 1
    Last Post: 01-12-2019, 03:36 PM
  2. [SOLVED] Average column if adjacent cells are between a specific number range
    By Madtaxi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2017, 08:56 PM
  3. Replies: 7
    Last Post: 05-20-2017, 08:46 AM
  4. Average number of Blank Cells between entries in a Range
    By skydavis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2016, 11:27 AM
  5. [SOLVED] Adding cells then dividing by number of cells to get average
    By srlang2010 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-25-2015, 04:24 PM
  6. Replies: 1
    Last Post: 07-27-2012, 05:37 PM
  7. Replies: 12
    Last Post: 01-24-2010, 06:46 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