How to find the minimum value and corresponding columns for each row in excel?











up vote
0
down vote

favorite












I have an excel sheet with following data



Name Time1 Number1 Time2 Number2 Time3 Number3 Time4 Number4 Time5 Number5

ABC 0.1 4 0.2 3 0.3 2 0.4 5 0.5 6
DEF 1.1 1 1.2 5 0.8 6 0.6 9 0.9 7
GHI 1.2 4 3.2 3 0.3 9 0.1 2 1.6 10


I want to find the minimum of Time1 to Time5 for each Name along with the corresponding Number. For time1 corresponding number is number1, for name2 is number2 and so on. for each row it should also which of the time it chooses. For example for the above data output should be like.



Name Time Number
ABC 0.1 4 Time1
DEF 0.6 9 Time4
GHI 0.1 2 Time4


here is sample
enter image description here
i will apply the formula in L for minimum time, corresponding number in M and which time in N.










share|improve this question




























    up vote
    0
    down vote

    favorite












    I have an excel sheet with following data



    Name Time1 Number1 Time2 Number2 Time3 Number3 Time4 Number4 Time5 Number5

    ABC 0.1 4 0.2 3 0.3 2 0.4 5 0.5 6
    DEF 1.1 1 1.2 5 0.8 6 0.6 9 0.9 7
    GHI 1.2 4 3.2 3 0.3 9 0.1 2 1.6 10


    I want to find the minimum of Time1 to Time5 for each Name along with the corresponding Number. For time1 corresponding number is number1, for name2 is number2 and so on. for each row it should also which of the time it chooses. For example for the above data output should be like.



    Name Time Number
    ABC 0.1 4 Time1
    DEF 0.6 9 Time4
    GHI 0.1 2 Time4


    here is sample
    enter image description here
    i will apply the formula in L for minimum time, corresponding number in M and which time in N.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have an excel sheet with following data



      Name Time1 Number1 Time2 Number2 Time3 Number3 Time4 Number4 Time5 Number5

      ABC 0.1 4 0.2 3 0.3 2 0.4 5 0.5 6
      DEF 1.1 1 1.2 5 0.8 6 0.6 9 0.9 7
      GHI 1.2 4 3.2 3 0.3 9 0.1 2 1.6 10


      I want to find the minimum of Time1 to Time5 for each Name along with the corresponding Number. For time1 corresponding number is number1, for name2 is number2 and so on. for each row it should also which of the time it chooses. For example for the above data output should be like.



      Name Time Number
      ABC 0.1 4 Time1
      DEF 0.6 9 Time4
      GHI 0.1 2 Time4


      here is sample
      enter image description here
      i will apply the formula in L for minimum time, corresponding number in M and which time in N.










      share|improve this question















      I have an excel sheet with following data



      Name Time1 Number1 Time2 Number2 Time3 Number3 Time4 Number4 Time5 Number5

      ABC 0.1 4 0.2 3 0.3 2 0.4 5 0.5 6
      DEF 1.1 1 1.2 5 0.8 6 0.6 9 0.9 7
      GHI 1.2 4 3.2 3 0.3 9 0.1 2 1.6 10


      I want to find the minimum of Time1 to Time5 for each Name along with the corresponding Number. For time1 corresponding number is number1, for name2 is number2 and so on. for each row it should also which of the time it chooses. For example for the above data output should be like.



      Name Time Number
      ABC 0.1 4 Time1
      DEF 0.6 9 Time4
      GHI 0.1 2 Time4


      here is sample
      enter image description here
      i will apply the formula in L for minimum time, corresponding number in M and which time in N.







      excel






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 7 at 11:27

























      asked Nov 7 at 9:01









      Mani

      166




      166
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          You can use these formulae



          enter image description here



          Cell M2: =A2
          Cell N2: =MIN(B2,D2,F2,H2,J2)
          Cell O2: =INDEX(B2:K2,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0)+1)
          Cell P2: =INDEX($B$1:$K$1,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0))


          The formula in cell O2 and P2 is an array formula, you have to press Ctrl+Shift+Enter to use it.






          share|improve this answer





















          • for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
            – Mani
            Nov 8 at 12:30










          • Which version of excel are you using?
            – usmanhaq
            Nov 8 at 13:41










          • the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
            – usmanhaq
            Nov 8 at 13:46


















          up vote
          0
          down vote













          Assuming your data starts at cell A1.
          Using ";" as seperator (might have to be changed to "," depending on your settings)



          Assuming the result is placed in the range (A8:D8), with A8 baring the name (in this example 'ABC') that serves as basis for the formulas:



          Formula for the time of ABC (in cell B8):



          =MIN(B2;D2;F2;H2;J2)


          Formula for the corresponding number of ABC (in cell C8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0)+1;MATCH(B8;A2:K2;0)+1;4))


          Formula for the remark of ABC (returns Time1) (in cell D8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0);MATCH(B8;A2:K2;0);4))


          Drag down for the other Names






          share|improve this answer























          • i have tried the above formula but it doesn't work.
            – Mani
            Nov 7 at 10:40










          • It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
            – Lambik
            Nov 7 at 10:41












          • again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
            – Lambik
            Nov 7 at 10:49










          • There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
            – Mani
            Nov 7 at 11:15










          • its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
            – Mani
            Nov 7 at 13:26













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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',
          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%2fstackoverflow.com%2fquestions%2f53186250%2fhow-to-find-the-minimum-value-and-corresponding-columns-for-each-row-in-excel%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          You can use these formulae



          enter image description here



          Cell M2: =A2
          Cell N2: =MIN(B2,D2,F2,H2,J2)
          Cell O2: =INDEX(B2:K2,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0)+1)
          Cell P2: =INDEX($B$1:$K$1,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0))


          The formula in cell O2 and P2 is an array formula, you have to press Ctrl+Shift+Enter to use it.






          share|improve this answer





















          • for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
            – Mani
            Nov 8 at 12:30










          • Which version of excel are you using?
            – usmanhaq
            Nov 8 at 13:41










          • the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
            – usmanhaq
            Nov 8 at 13:46















          up vote
          0
          down vote



          accepted










          You can use these formulae



          enter image description here



          Cell M2: =A2
          Cell N2: =MIN(B2,D2,F2,H2,J2)
          Cell O2: =INDEX(B2:K2,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0)+1)
          Cell P2: =INDEX($B$1:$K$1,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0))


          The formula in cell O2 and P2 is an array formula, you have to press Ctrl+Shift+Enter to use it.






          share|improve this answer





















          • for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
            – Mani
            Nov 8 at 12:30










          • Which version of excel are you using?
            – usmanhaq
            Nov 8 at 13:41










          • the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
            – usmanhaq
            Nov 8 at 13:46













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          You can use these formulae



          enter image description here



          Cell M2: =A2
          Cell N2: =MIN(B2,D2,F2,H2,J2)
          Cell O2: =INDEX(B2:K2,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0)+1)
          Cell P2: =INDEX($B$1:$K$1,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0))


          The formula in cell O2 and P2 is an array formula, you have to press Ctrl+Shift+Enter to use it.






          share|improve this answer












          You can use these formulae



          enter image description here



          Cell M2: =A2
          Cell N2: =MIN(B2,D2,F2,H2,J2)
          Cell O2: =INDEX(B2:K2,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0)+1)
          Cell P2: =INDEX($B$1:$K$1,0,MATCH(N2,IF(LEFT($B$1:$K$1,4)="Time",B2:K2),0))


          The formula in cell O2 and P2 is an array formula, you have to press Ctrl+Shift+Enter to use it.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 8 at 11:37









          usmanhaq

          69127




          69127












          • for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
            – Mani
            Nov 8 at 12:30










          • Which version of excel are you using?
            – usmanhaq
            Nov 8 at 13:41










          • the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
            – usmanhaq
            Nov 8 at 13:46


















          • for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
            – Mani
            Nov 8 at 12:30










          • Which version of excel are you using?
            – usmanhaq
            Nov 8 at 13:41










          • the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
            – usmanhaq
            Nov 8 at 13:46
















          for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
          – Mani
          Nov 8 at 12:30




          for exactly same values as above in the table that i gave, your formula doesn't work and gives N/A for the second value. it should give 7 but it gave N/A
          – Mani
          Nov 8 at 12:30












          Which version of excel are you using?
          – usmanhaq
          Nov 8 at 13:41




          Which version of excel are you using?
          – usmanhaq
          Nov 8 at 13:41












          the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
          – usmanhaq
          Nov 8 at 13:46




          the difference between my table and yours is that in my table the Time is with capital T and in your sheet it is simple time. Change the ="Time" to ="time" in the formula
          – usmanhaq
          Nov 8 at 13:46












          up vote
          0
          down vote













          Assuming your data starts at cell A1.
          Using ";" as seperator (might have to be changed to "," depending on your settings)



          Assuming the result is placed in the range (A8:D8), with A8 baring the name (in this example 'ABC') that serves as basis for the formulas:



          Formula for the time of ABC (in cell B8):



          =MIN(B2;D2;F2;H2;J2)


          Formula for the corresponding number of ABC (in cell C8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0)+1;MATCH(B8;A2:K2;0)+1;4))


          Formula for the remark of ABC (returns Time1) (in cell D8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0);MATCH(B8;A2:K2;0);4))


          Drag down for the other Names






          share|improve this answer























          • i have tried the above formula but it doesn't work.
            – Mani
            Nov 7 at 10:40










          • It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
            – Lambik
            Nov 7 at 10:41












          • again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
            – Lambik
            Nov 7 at 10:49










          • There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
            – Mani
            Nov 7 at 11:15










          • its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
            – Mani
            Nov 7 at 13:26

















          up vote
          0
          down vote













          Assuming your data starts at cell A1.
          Using ";" as seperator (might have to be changed to "," depending on your settings)



          Assuming the result is placed in the range (A8:D8), with A8 baring the name (in this example 'ABC') that serves as basis for the formulas:



          Formula for the time of ABC (in cell B8):



          =MIN(B2;D2;F2;H2;J2)


          Formula for the corresponding number of ABC (in cell C8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0)+1;MATCH(B8;A2:K2;0)+1;4))


          Formula for the remark of ABC (returns Time1) (in cell D8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0);MATCH(B8;A2:K2;0);4))


          Drag down for the other Names






          share|improve this answer























          • i have tried the above formula but it doesn't work.
            – Mani
            Nov 7 at 10:40










          • It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
            – Lambik
            Nov 7 at 10:41












          • again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
            – Lambik
            Nov 7 at 10:49










          • There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
            – Mani
            Nov 7 at 11:15










          • its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
            – Mani
            Nov 7 at 13:26















          up vote
          0
          down vote










          up vote
          0
          down vote









          Assuming your data starts at cell A1.
          Using ";" as seperator (might have to be changed to "," depending on your settings)



          Assuming the result is placed in the range (A8:D8), with A8 baring the name (in this example 'ABC') that serves as basis for the formulas:



          Formula for the time of ABC (in cell B8):



          =MIN(B2;D2;F2;H2;J2)


          Formula for the corresponding number of ABC (in cell C8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0)+1;MATCH(B8;A2:K2;0)+1;4))


          Formula for the remark of ABC (returns Time1) (in cell D8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0);MATCH(B8;A2:K2;0);4))


          Drag down for the other Names






          share|improve this answer














          Assuming your data starts at cell A1.
          Using ";" as seperator (might have to be changed to "," depending on your settings)



          Assuming the result is placed in the range (A8:D8), with A8 baring the name (in this example 'ABC') that serves as basis for the formulas:



          Formula for the time of ABC (in cell B8):



          =MIN(B2;D2;F2;H2;J2)


          Formula for the corresponding number of ABC (in cell C8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0)+1;MATCH(B8;A2:K2;0)+1;4))


          Formula for the remark of ABC (returns Time1) (in cell D8):



          =INDIRECT(ADDRESS(MATCH(A8;A$2:A$4;0);MATCH(B8;A2:K2;0);4))


          Drag down for the other Names







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 8 at 10:46

























          answered Nov 7 at 9:35









          Lambik

          31319




          31319












          • i have tried the above formula but it doesn't work.
            – Mani
            Nov 7 at 10:40










          • It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
            – Lambik
            Nov 7 at 10:41












          • again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
            – Lambik
            Nov 7 at 10:49










          • There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
            – Mani
            Nov 7 at 11:15










          • its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
            – Mani
            Nov 7 at 13:26




















          • i have tried the above formula but it doesn't work.
            – Mani
            Nov 7 at 10:40










          • It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
            – Lambik
            Nov 7 at 10:41












          • again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
            – Lambik
            Nov 7 at 10:49










          • There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
            – Mani
            Nov 7 at 11:15










          • its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
            – Mani
            Nov 7 at 13:26


















          i have tried the above formula but it doesn't work.
          – Mani
          Nov 7 at 10:40




          i have tried the above formula but it doesn't work.
          – Mani
          Nov 7 at 10:40












          It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
          – Lambik
          Nov 7 at 10:41






          It doesn't work is not really an answer. What does the formula return? An error (which one), or the wrong value? Are the references correct, is the seperator the correct one (most people on this forum use "," as per default, whereas in my region ";" is the common one)
          – Lambik
          Nov 7 at 10:41














          again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
          – Lambik
          Nov 7 at 10:49




          again, "doesn't work" is nothing I can work with. What does the formula return? Edit your question to show the exact ranges you are using and explain clearly what is not going as expected (what do you expect, what do you get as result)? Does the remark return the correct value?µ
          – Lambik
          Nov 7 at 10:49












          There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
          – Mani
          Nov 7 at 11:15




          There is some problem with the references. first row has name and ABC starts at A2. the formula to find minimum works fine. for the other formula i am getting N/A. i have made a small excel with exactly the same values as above. e.g. the first row starts from A2 and goes till K2. I am applying formula in L2.
          – Mani
          Nov 7 at 11:15












          its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
          – Mani
          Nov 7 at 13:26






          its still says N/A...what is the vlaue of A8 here??? i am new to excel so having trouble applying formula.
          – Mani
          Nov 7 at 13:26




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53186250%2fhow-to-find-the-minimum-value-and-corresponding-columns-for-each-row-in-excel%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







          這個網誌中的熱門文章

          Academy of Television Arts & Sciences

          L'Équipe

          1995 France bombings