Select row with 2 conditions met

guptamols

New Member
Joined
May 22, 2017
Messages
9
[TABLE="width: 199"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD]Product[/TD]
[TD] Cr1[/TD]
[TD] Cr2[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]0.9619[/TD]
[TD="align: right"]2.54[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]0.8791[/TD]
[TD="align: right"]1190.17[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD="align: right"]0.8386[/TD]
[TD="align: right"]1567.58[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD="align: right"]0.7724[/TD]
[TD="align: right"]1.36[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD="align: right"]0.7508[/TD]
[TD="align: right"]1.53[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD="align: right"]0.7508[/TD]
[TD="align: right"]18.06[/TD]
[/TR]
[TR]
[TD]G[/TD]
[TD="align: right"]0.7485[/TD]
[TD="align: right"]1659.38[/TD]
[/TR]
[TR]
[TD]H[/TD]
[TD="align: right"]0.7485[/TD]
[TD="align: right"]1649.66[/TD]
[/TR]
[TR]
[TD]I[/TD]
[TD="align: right"]0.7485[/TD]
[TD="align: right"]1661.76[/TD]
[/TR]
[TR]
[TD]J[/TD]
[TD="align: right"]0.7153[/TD]
[TD="align: right"]1617.04[/TD]
[/TR]
</tbody>[/TABLE]

My Excel has 3 columns, these basically has 2 Criterions -

Cr 2 : Has to be minimum possible with threshold as 2 (i.e. cannot be less than 2)
Cr 1 : Has to be maximum amongst the minimum possible values of Cr 2.

For e.g. Above, select minimum of Cr 2 > D & E and then select Max amongst D & E - which is E
So the result is E

Have to do the same repeatedly so want some automation solution (formula etc) related to the same.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi. Could you explain that again? First thing I read is Cr 2 cannot be less than 2. Then you say the answer is E where Cr 2 is 1.53. That's less than 2 isn't it? Am I missing something?
 
Upvote 0
You can use Conditional Formatting to highlight the row if you'd like. Try this:

Highlight A2:C11 > Conditional Formatting > New Rule > Use a formula

=$C2=SMALL($C:$C,COUNTIF($C:$C,"<="&2))

Format however you like > OK > OK

0.7724 > 0.7508 so I don't know why column E would be highlighted. Because of this confusion, this formula does not take column B (Cr1) into account.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top