Is there a function in Excel to find the maximum absolute value of a range?












13















I'm looking for a function in Excel that looks something like



= MAX(ABS(A1:A10))


except ABS() doesn't take a range of numbers.



The best that I can come up with is:



= MAX(ABS(MIN(A1:A10)),ABS(MAX(A1:A10)))


It does the trick, but it's messy as all heck and I can't believe there's not a better way. Any ideas?










share|improve this question





























    13















    I'm looking for a function in Excel that looks something like



    = MAX(ABS(A1:A10))


    except ABS() doesn't take a range of numbers.



    The best that I can come up with is:



    = MAX(ABS(MIN(A1:A10)),ABS(MAX(A1:A10)))


    It does the trick, but it's messy as all heck and I can't believe there's not a better way. Any ideas?










    share|improve this question



























      13












      13








      13


      1






      I'm looking for a function in Excel that looks something like



      = MAX(ABS(A1:A10))


      except ABS() doesn't take a range of numbers.



      The best that I can come up with is:



      = MAX(ABS(MIN(A1:A10)),ABS(MAX(A1:A10)))


      It does the trick, but it's messy as all heck and I can't believe there's not a better way. Any ideas?










      share|improve this question
















      I'm looking for a function in Excel that looks something like



      = MAX(ABS(A1:A10))


      except ABS() doesn't take a range of numbers.



      The best that I can come up with is:



      = MAX(ABS(MIN(A1:A10)),ABS(MAX(A1:A10)))


      It does the trick, but it's messy as all heck and I can't believe there's not a better way. Any ideas?







      microsoft-excel worksheet-function






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 22 '15 at 20:59









      G-Man

      5,617112357




      5,617112357










      asked Oct 14 '11 at 0:38









      BenBen

      197129




      197129






















          7 Answers
          7






          active

          oldest

          votes


















          21














          You must enter it as an array formula. Do so by pressing Ctrl.+Shift+Enter. The formula will appear as {=MAX(ABS(A1:A10))} if done correctly.






          share|improve this answer





















          • 4





            Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

            – Ben
            Oct 14 '11 at 19:26











          • Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

            – Pedro77
            May 7 '14 at 17:30











          • It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

            – sancho.s
            Nov 20 '14 at 2:23






          • 2





            This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

            – CBRF23
            Feb 6 '15 at 15:41



















          19














          I don't like arrays so I would use the following:



          =MAX(-MIN(range), MAX(range))


          This works because the only time the absolute of the minimum number would be higher that the maximum value is if it is a negative number.






          share|improve this answer


























          • This works if your range also contains non-numeric data (e.g. text or formula errors)

            – CBRF23
            Feb 6 '15 at 15:40











          • Nice, this is a missing feature in excel, why not max(abs()) ??

            – Pedro77
            May 31 '17 at 23:21











          • @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

            – Paul van Leeuwen
            Jan 21 at 23:17



















          2














          Try this formula (from here)



          =MAX(INDEX(ABS(A1:A10),0,1))


          It combines:




          • The benefits of a non-array formula, as in this answer above (see this for the benefits of non-array).

          • Entering the target range only once, as in this answer above (less prone to errors, and easier to modify).






          share|improve this answer

































            1














            This VBA solution works too.



            Public Function absMax(values As Range)
            'returns the largest absolute value in a list of pos and neg numbers

            Dim myArray() As Double, i As Integer, numel As Integer
            numel = values.count
            ReDim myArray(1 To numel)
            For i = 1 To numel
            myArray(i) = Abs(values(i))
            Next i
            absMax = WorksheetFunction.Max(myArray)

            End Function



            1. Open your VBA editor (Alt+F11)

            2. Insert a new module on the right pane

            3. Copy & paste the code to the module

            4. Go back to Excel and use =absMax(A1:A3)


            enter image description here






            share|improve this answer

































              0














              =IF(ABS(LARGE(A1:A10,1))>ABS(SMALL(A1:A10,1)),LARGE(A1:A10,1),SMALL(A1:A10,1))


              This will find the value with the largest absolute value out of the range but still return the actual value with its original sign (+/-) and not the absolute value.






              share|improve this answer


























              • (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                – G-Man
                Apr 22 '15 at 20:56











              • (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                – G-Man
                Apr 22 '15 at 20:57











              • @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                – Portland Runner
                Oct 6 '15 at 16:23



















              0














              =MAX(MAX(X1:X5),ABS(MIN(X1:X5)))






              share|improve this answer
























              • so how is it different from Julie's answer?

                – phuclv
                Nov 14 '17 at 8:46











              • This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                – xenoid
                Nov 14 '17 at 16:19



















              -1














              =IF(MAX(A1:A10)+MIN(A1:A10)>0, MAX(A1:A10), MIN(A1:A10))





              share|improve this answer





















              • 2





                We prefer answers that include an explanation.

                – Scott
                Jan 3 at 2:07











              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f346362%2fis-there-a-function-in-excel-to-find-the-maximum-absolute-value-of-a-range%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              21














              You must enter it as an array formula. Do so by pressing Ctrl.+Shift+Enter. The formula will appear as {=MAX(ABS(A1:A10))} if done correctly.






              share|improve this answer





















              • 4





                Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

                – Ben
                Oct 14 '11 at 19:26











              • Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

                – Pedro77
                May 7 '14 at 17:30











              • It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

                – sancho.s
                Nov 20 '14 at 2:23






              • 2





                This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:41
















              21














              You must enter it as an array formula. Do so by pressing Ctrl.+Shift+Enter. The formula will appear as {=MAX(ABS(A1:A10))} if done correctly.






              share|improve this answer





















              • 4





                Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

                – Ben
                Oct 14 '11 at 19:26











              • Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

                – Pedro77
                May 7 '14 at 17:30











              • It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

                – sancho.s
                Nov 20 '14 at 2:23






              • 2





                This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:41














              21












              21








              21







              You must enter it as an array formula. Do so by pressing Ctrl.+Shift+Enter. The formula will appear as {=MAX(ABS(A1:A10))} if done correctly.






              share|improve this answer















              You must enter it as an array formula. Do so by pressing Ctrl.+Shift+Enter. The formula will appear as {=MAX(ABS(A1:A10))} if done correctly.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 18 '12 at 18:41

























              answered Oct 14 '11 at 0:41









              ExcellllExcellll

              11.1k74162




              11.1k74162








              • 4





                Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

                – Ben
                Oct 14 '11 at 19:26











              • Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

                – Pedro77
                May 7 '14 at 17:30











              • It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

                – sancho.s
                Nov 20 '14 at 2:23






              • 2





                This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:41














              • 4





                Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

                – Ben
                Oct 14 '11 at 19:26











              • Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

                – Pedro77
                May 7 '14 at 17:30











              • It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

                – sancho.s
                Nov 20 '14 at 2:23






              • 2





                This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:41








              4




              4





              Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

              – Ben
              Oct 14 '11 at 19:26





              Note to numb-skulls like myself: Enter the formula then press Ctrl+Shift+Enter, I was trying to press ctrl+shift+enter first, then enter the formula, that didn't really work so well. :P

              – Ben
              Oct 14 '11 at 19:26













              Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

              – Pedro77
              May 7 '14 at 17:30





              Excel is not user-friendly when it comes to matrix formulas. It behaviors is really annoying.

              – Pedro77
              May 7 '14 at 17:30













              It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

              – sancho.s
              Nov 20 '14 at 2:23





              It is not mandatory to use an array formula (see this and this. Moreover, it might be inconvenient.

              – sancho.s
              Nov 20 '14 at 2:23




              2




              2





              This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

              – CBRF23
              Feb 6 '15 at 15:41





              This returns an error if your range also contains non-numeric data (e.g. text or formula errors)

              – CBRF23
              Feb 6 '15 at 15:41













              19














              I don't like arrays so I would use the following:



              =MAX(-MIN(range), MAX(range))


              This works because the only time the absolute of the minimum number would be higher that the maximum value is if it is a negative number.






              share|improve this answer


























              • This works if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:40











              • Nice, this is a missing feature in excel, why not max(abs()) ??

                – Pedro77
                May 31 '17 at 23:21











              • @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

                – Paul van Leeuwen
                Jan 21 at 23:17
















              19














              I don't like arrays so I would use the following:



              =MAX(-MIN(range), MAX(range))


              This works because the only time the absolute of the minimum number would be higher that the maximum value is if it is a negative number.






              share|improve this answer


























              • This works if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:40











              • Nice, this is a missing feature in excel, why not max(abs()) ??

                – Pedro77
                May 31 '17 at 23:21











              • @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

                – Paul van Leeuwen
                Jan 21 at 23:17














              19












              19








              19







              I don't like arrays so I would use the following:



              =MAX(-MIN(range), MAX(range))


              This works because the only time the absolute of the minimum number would be higher that the maximum value is if it is a negative number.






              share|improve this answer















              I don't like arrays so I would use the following:



              =MAX(-MIN(range), MAX(range))


              This works because the only time the absolute of the minimum number would be higher that the maximum value is if it is a negative number.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Sep 5 '13 at 22:51









              Doktoro Reichard

              4,50442840




              4,50442840










              answered Sep 5 '13 at 21:50









              JulieJulie

              19112




              19112













              • This works if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:40











              • Nice, this is a missing feature in excel, why not max(abs()) ??

                – Pedro77
                May 31 '17 at 23:21











              • @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

                – Paul van Leeuwen
                Jan 21 at 23:17



















              • This works if your range also contains non-numeric data (e.g. text or formula errors)

                – CBRF23
                Feb 6 '15 at 15:40











              • Nice, this is a missing feature in excel, why not max(abs()) ??

                – Pedro77
                May 31 '17 at 23:21











              • @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

                – Paul van Leeuwen
                Jan 21 at 23:17

















              This works if your range also contains non-numeric data (e.g. text or formula errors)

              – CBRF23
              Feb 6 '15 at 15:40





              This works if your range also contains non-numeric data (e.g. text or formula errors)

              – CBRF23
              Feb 6 '15 at 15:40













              Nice, this is a missing feature in excel, why not max(abs()) ??

              – Pedro77
              May 31 '17 at 23:21





              Nice, this is a missing feature in excel, why not max(abs()) ??

              – Pedro77
              May 31 '17 at 23:21













              @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

              – Paul van Leeuwen
              Jan 21 at 23:17





              @Julie your now +5yr old answer still has an audience. :) You propose an alternative which avoids using the array function, which you indicate you consider a plus. Do you still dislike array functions? Could you comment on why you do not (or did not) like array functions? Knowing more about your considerations might help me and other readers evaluate which solution we would like to use in which context.

              – Paul van Leeuwen
              Jan 21 at 23:17











              2














              Try this formula (from here)



              =MAX(INDEX(ABS(A1:A10),0,1))


              It combines:




              • The benefits of a non-array formula, as in this answer above (see this for the benefits of non-array).

              • Entering the target range only once, as in this answer above (less prone to errors, and easier to modify).






              share|improve this answer






























                2














                Try this formula (from here)



                =MAX(INDEX(ABS(A1:A10),0,1))


                It combines:




                • The benefits of a non-array formula, as in this answer above (see this for the benefits of non-array).

                • Entering the target range only once, as in this answer above (less prone to errors, and easier to modify).






                share|improve this answer




























                  2












                  2








                  2







                  Try this formula (from here)



                  =MAX(INDEX(ABS(A1:A10),0,1))


                  It combines:




                  • The benefits of a non-array formula, as in this answer above (see this for the benefits of non-array).

                  • Entering the target range only once, as in this answer above (less prone to errors, and easier to modify).






                  share|improve this answer















                  Try this formula (from here)



                  =MAX(INDEX(ABS(A1:A10),0,1))


                  It combines:




                  • The benefits of a non-array formula, as in this answer above (see this for the benefits of non-array).

                  • Entering the target range only once, as in this answer above (less prone to errors, and easier to modify).







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 23 '17 at 12:41









                  Community

                  1




                  1










                  answered Jul 21 '14 at 9:24









                  sancho.ssancho.s

                  1,6491434




                  1,6491434























                      1














                      This VBA solution works too.



                      Public Function absMax(values As Range)
                      'returns the largest absolute value in a list of pos and neg numbers

                      Dim myArray() As Double, i As Integer, numel As Integer
                      numel = values.count
                      ReDim myArray(1 To numel)
                      For i = 1 To numel
                      myArray(i) = Abs(values(i))
                      Next i
                      absMax = WorksheetFunction.Max(myArray)

                      End Function



                      1. Open your VBA editor (Alt+F11)

                      2. Insert a new module on the right pane

                      3. Copy & paste the code to the module

                      4. Go back to Excel and use =absMax(A1:A3)


                      enter image description here






                      share|improve this answer






























                        1














                        This VBA solution works too.



                        Public Function absMax(values As Range)
                        'returns the largest absolute value in a list of pos and neg numbers

                        Dim myArray() As Double, i As Integer, numel As Integer
                        numel = values.count
                        ReDim myArray(1 To numel)
                        For i = 1 To numel
                        myArray(i) = Abs(values(i))
                        Next i
                        absMax = WorksheetFunction.Max(myArray)

                        End Function



                        1. Open your VBA editor (Alt+F11)

                        2. Insert a new module on the right pane

                        3. Copy & paste the code to the module

                        4. Go back to Excel and use =absMax(A1:A3)


                        enter image description here






                        share|improve this answer




























                          1












                          1








                          1







                          This VBA solution works too.



                          Public Function absMax(values As Range)
                          'returns the largest absolute value in a list of pos and neg numbers

                          Dim myArray() As Double, i As Integer, numel As Integer
                          numel = values.count
                          ReDim myArray(1 To numel)
                          For i = 1 To numel
                          myArray(i) = Abs(values(i))
                          Next i
                          absMax = WorksheetFunction.Max(myArray)

                          End Function



                          1. Open your VBA editor (Alt+F11)

                          2. Insert a new module on the right pane

                          3. Copy & paste the code to the module

                          4. Go back to Excel and use =absMax(A1:A3)


                          enter image description here






                          share|improve this answer















                          This VBA solution works too.



                          Public Function absMax(values As Range)
                          'returns the largest absolute value in a list of pos and neg numbers

                          Dim myArray() As Double, i As Integer, numel As Integer
                          numel = values.count
                          ReDim myArray(1 To numel)
                          For i = 1 To numel
                          myArray(i) = Abs(values(i))
                          Next i
                          absMax = WorksheetFunction.Max(myArray)

                          End Function



                          1. Open your VBA editor (Alt+F11)

                          2. Insert a new module on the right pane

                          3. Copy & paste the code to the module

                          4. Go back to Excel and use =absMax(A1:A3)


                          enter image description here







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 14 '17 at 8:46









                          phuclv

                          9,09463890




                          9,09463890










                          answered Jul 8 '13 at 20:13









                          VeryBadAssVeryBadAss

                          211




                          211























                              0














                              =IF(ABS(LARGE(A1:A10,1))>ABS(SMALL(A1:A10,1)),LARGE(A1:A10,1),SMALL(A1:A10,1))


                              This will find the value with the largest absolute value out of the range but still return the actual value with its original sign (+/-) and not the absolute value.






                              share|improve this answer


























                              • (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                                – G-Man
                                Apr 22 '15 at 20:56











                              • (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                                – G-Man
                                Apr 22 '15 at 20:57











                              • @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                                – Portland Runner
                                Oct 6 '15 at 16:23
















                              0














                              =IF(ABS(LARGE(A1:A10,1))>ABS(SMALL(A1:A10,1)),LARGE(A1:A10,1),SMALL(A1:A10,1))


                              This will find the value with the largest absolute value out of the range but still return the actual value with its original sign (+/-) and not the absolute value.






                              share|improve this answer


























                              • (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                                – G-Man
                                Apr 22 '15 at 20:56











                              • (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                                – G-Man
                                Apr 22 '15 at 20:57











                              • @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                                – Portland Runner
                                Oct 6 '15 at 16:23














                              0












                              0








                              0







                              =IF(ABS(LARGE(A1:A10,1))>ABS(SMALL(A1:A10,1)),LARGE(A1:A10,1),SMALL(A1:A10,1))


                              This will find the value with the largest absolute value out of the range but still return the actual value with its original sign (+/-) and not the absolute value.






                              share|improve this answer















                              =IF(ABS(LARGE(A1:A10,1))>ABS(SMALL(A1:A10,1)),LARGE(A1:A10,1),SMALL(A1:A10,1))


                              This will find the value with the largest absolute value out of the range but still return the actual value with its original sign (+/-) and not the absolute value.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Apr 22 '15 at 20:54









                              G-Man

                              5,617112357




                              5,617112357










                              answered Jan 16 '15 at 9:32









                              RishiRishi

                              171




                              171













                              • (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                                – G-Man
                                Apr 22 '15 at 20:56











                              • (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                                – G-Man
                                Apr 22 '15 at 20:57











                              • @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                                – Portland Runner
                                Oct 6 '15 at 16:23



















                              • (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                                – G-Man
                                Apr 22 '15 at 20:56











                              • (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                                – G-Man
                                Apr 22 '15 at 20:57











                              • @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                                – Portland Runner
                                Oct 6 '15 at 16:23

















                              (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                              – G-Man
                              Apr 22 '15 at 20:56





                              (1) As you know, this is not an answer to this question.  It is the answer to a different question.  We prefer to keep answers with the questions that they go with.  If you really want to post this answer, you might want to “ask” the corresponding question and then answer it.  (You are allowed to do that, but, since you have a low reputation, you might have to wait several hours before you can answer your own question.)

                              – G-Man
                              Apr 22 '15 at 20:56













                              (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                              – G-Man
                              Apr 22 '15 at 20:57





                              (2) The OP already has a working answer to the question, and rejects it because “it’s messy as all heck and I can’t believe there’s not a better way.”  So why post an answer that’s twice as long as the one he already has?  For that matter, why not say just =IF(ABS(MAX(A1:A10))>ABS(MIN(A1:A10)),MAX(A1:A10),MIN(A1:A10))?

                              – G-Man
                              Apr 22 '15 at 20:57













                              @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                              – Portland Runner
                              Oct 6 '15 at 16:23





                              @G-Man This is the only formula solution, posted so far, that keeps the original sign intact, which is not explicitly requested by the OP but was helpful to me. I respectfully disagree with both your assessments.

                              – Portland Runner
                              Oct 6 '15 at 16:23











                              0














                              =MAX(MAX(X1:X5),ABS(MIN(X1:X5)))






                              share|improve this answer
























                              • so how is it different from Julie's answer?

                                – phuclv
                                Nov 14 '17 at 8:46











                              • This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                                – xenoid
                                Nov 14 '17 at 16:19
















                              0














                              =MAX(MAX(X1:X5),ABS(MIN(X1:X5)))






                              share|improve this answer
























                              • so how is it different from Julie's answer?

                                – phuclv
                                Nov 14 '17 at 8:46











                              • This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                                – xenoid
                                Nov 14 '17 at 16:19














                              0












                              0








                              0







                              =MAX(MAX(X1:X5),ABS(MIN(X1:X5)))






                              share|improve this answer













                              =MAX(MAX(X1:X5),ABS(MIN(X1:X5)))







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Nov 14 '17 at 8:02









                              TAZIOUTAZIOU

                              11




                              11













                              • so how is it different from Julie's answer?

                                – phuclv
                                Nov 14 '17 at 8:46











                              • This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                                – xenoid
                                Nov 14 '17 at 16:19



















                              • so how is it different from Julie's answer?

                                – phuclv
                                Nov 14 '17 at 8:46











                              • This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                                – xenoid
                                Nov 14 '17 at 16:19

















                              so how is it different from Julie's answer?

                              – phuclv
                              Nov 14 '17 at 8:46





                              so how is it different from Julie's answer?

                              – phuclv
                              Nov 14 '17 at 8:46













                              This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                              – xenoid
                              Nov 14 '17 at 16:19





                              This is an answer to the question (belated, yes). Similar to Julie's, yes, slightly less efficient, perhaps, but IMHO a bit more obvious for someone who inherits the spreadsheet.

                              – xenoid
                              Nov 14 '17 at 16:19











                              -1














                              =IF(MAX(A1:A10)+MIN(A1:A10)>0, MAX(A1:A10), MIN(A1:A10))





                              share|improve this answer





















                              • 2





                                We prefer answers that include an explanation.

                                – Scott
                                Jan 3 at 2:07
















                              -1














                              =IF(MAX(A1:A10)+MIN(A1:A10)>0, MAX(A1:A10), MIN(A1:A10))





                              share|improve this answer





















                              • 2





                                We prefer answers that include an explanation.

                                – Scott
                                Jan 3 at 2:07














                              -1












                              -1








                              -1







                              =IF(MAX(A1:A10)+MIN(A1:A10)>0, MAX(A1:A10), MIN(A1:A10))





                              share|improve this answer















                              =IF(MAX(A1:A10)+MIN(A1:A10)>0, MAX(A1:A10), MIN(A1:A10))






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jan 3 at 7:32









                              Mureinik

                              2,54561625




                              2,54561625










                              answered Jan 3 at 1:59









                              Andrew KIMAndrew KIM

                              1




                              1








                              • 2





                                We prefer answers that include an explanation.

                                – Scott
                                Jan 3 at 2:07














                              • 2





                                We prefer answers that include an explanation.

                                – Scott
                                Jan 3 at 2:07








                              2




                              2





                              We prefer answers that include an explanation.

                              – Scott
                              Jan 3 at 2:07





                              We prefer answers that include an explanation.

                              – Scott
                              Jan 3 at 2:07


















                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f346362%2fis-there-a-function-in-excel-to-find-the-maximum-absolute-value-of-a-range%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                              Alcedinidae

                              RAC Tourist Trophy