Hi all excel experts,
I am not able to solve a problem which I will explain by using the following dummy dataset:
Problem1:
Assume I have a dataset from A1 to D5 as follows:
Name Value Status Reason
A 10 Yes X1
A 15 No Y1
A 10 No
A 15 Yes
I want excel to give me maximum value of col B(Value) when status = "Yes". I am able to do this by using the following array formula at B7:
{=MAX(IF(C2:C5=A7,B2:B5))}....(A7="Yes")...returns me 15
Now, in other cell, I want to fetch the corresponding value from status col (Col C) for the value 15, which in this case could be "No" or "Yes". But I want the formula to specifically give me "Yes" as I want excel to give me the maximum value (from "Value" or "B" col) when status = "Yes"
I am trying to get this done by using (I understand I might be doing this in wrong way):
{=INDEX(C2:C5,MATCH(A9,IF(B2:B5=B7,A2:A5),0))}....(A9="A", B7=15)
But I am getting "No"....(I understand formula is considering the first occurence where the corresponding value for 15 = No).
So in a word, for first formula I want 15 and for second formula I want "Yes" (instead of "No")
Problem2:
Assume I have a dataset from A11 to D14 as follows:
Name Value Status Reason
A 10 No X1
A 10 Yes
A 15 Yes
For first formula I want the second largest value from col "B" (e.i. 10) and for second formula I want "Yes"(for status col)
Please note that, since, I am posting this from my office network, I am not being able to upload the data file due to firewall policy.
Hope I am able to make my points clear.
Looking forward to your help
Kaushik
I am not able to solve a problem which I will explain by using the following dummy dataset:
Problem1:
Assume I have a dataset from A1 to D5 as follows:
Name Value Status Reason
A 10 Yes X1
A 15 No Y1
A 10 No
A 15 Yes
I want excel to give me maximum value of col B(Value) when status = "Yes". I am able to do this by using the following array formula at B7:
{=MAX(IF(C2:C5=A7,B2:B5))}....(A7="Yes")...returns me 15
Now, in other cell, I want to fetch the corresponding value from status col (Col C) for the value 15, which in this case could be "No" or "Yes". But I want the formula to specifically give me "Yes" as I want excel to give me the maximum value (from "Value" or "B" col) when status = "Yes"
I am trying to get this done by using (I understand I might be doing this in wrong way):
{=INDEX(C2:C5,MATCH(A9,IF(B2:B5=B7,A2:A5),0))}....(A9="A", B7=15)
But I am getting "No"....(I understand formula is considering the first occurence where the corresponding value for 15 = No).
So in a word, for first formula I want 15 and for second formula I want "Yes" (instead of "No")
Problem2:
Assume I have a dataset from A11 to D14 as follows:
Name Value Status Reason
A 10 No X1
A 10 Yes
A 15 Yes
For first formula I want the second largest value from col "B" (e.i. 10) and for second formula I want "Yes"(for status col)
Please note that, since, I am posting this from my office network, I am not being able to upload the data file due to firewall policy.
Hope I am able to make my points clear.
Looking forward to your help
Kaushik