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

i will apply the formula in L for minimum time, corresponding number in M and which time in N.
excel
add a comment |
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

i will apply the formula in L for minimum time, corresponding number in M and which time in N.
excel
add a comment |
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

i will apply the formula in L for minimum time, corresponding number in M and which time in N.
excel
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

i will apply the formula in L for minimum time, corresponding number in M and which time in N.
excel
excel
edited Nov 7 at 11:27
asked Nov 7 at 9:01
Mani
166
166
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
You can use these formulae

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.
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
add a comment |
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
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
|
show 7 more comments
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

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.
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
add a comment |
up vote
0
down vote
accepted
You can use these formulae

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.
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
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You can use these formulae

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.
You can use these formulae

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.
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
add a comment |
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
add a comment |
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
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
|
show 7 more comments
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
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
|
show 7 more comments
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
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
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
|
show 7 more comments
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
|
show 7 more comments
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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