Should be a quick answer for you guys...

qrtback10

New Member
Joined
Jan 19, 2015
Messages
20
I have the formula below working like I want but I need to add ONE MORE criteria: the returned value must also have a rating of "AA" in column P2:P14. How in the world do I do this??

Code:
=INDEX([COLOR=#F7981D]O2:O13[/COLOR],MATCH(MIN(ABS([COLOR=#7E3794]K2:K14[/COLOR]-[COLOR=#11A9CC]S2[/COLOR])),ABS([COLOR=#7E3794]K2:K14[/COLOR]-[COLOR=#11A9CC]S2[/COLOR]),[COLOR=#1155CC]0[/COLOR]))

Thanks!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Would wrapping an IF statement around it work? Something like the below?
=IF(P2:P14="AA",INDEX(O2:O13,MATCH(MIN(ABS(K2:K14-S2)),ABS(K2:K14-S2),0)),0)</pre>
 
Upvote 0
Maybe:
Code:
=INDEX(O2:O13,MATCH("AA"&MIN(ABS(K2:K14-S2)),P2:P14&ABS(K2:K14-S2),0))
 
Upvote 0
Again, no but I think you're on the right track! Maybe I didn't have the formula right to begin with? What I have is in the table below. I need to find the "Maximum Minimum" of S2 (the closest to S2 without going over like the Price is Right), WITH P2:P14 being equal to "AA". Sometimes it works, sometimes it doesn't. I feel like maybe now maybe the problem is with my original formula? Because your answer looks correct as far as what I'm looking for but again, I'm a novice at this obviously. Thoughts?

Beginning code that might not be doing what I need it to be doing:
Code:
[COLOR=#000000]=INDEX([/COLOR][COLOR=#F7981D]O2:O13[/COLOR][COLOR=#000000],MATCH(MIN(ABS([/COLOR][COLOR=#7E3794]K2:K14[/COLOR][COLOR=#000000]-[/COLOR][COLOR=#11A9CC]S2[/COLOR][COLOR=#000000])),ABS([/COLOR][COLOR=#7E3794]K2:K14[/COLOR][COLOR=#000000]-[/COLOR][COLOR=#11A9CC]S2[/COLOR][COLOR=#000000]),[/COLOR][COLOR=#1155CC]0[/COLOR][COLOR=#000000]))[/COLOR]

Table that I'm working with: (Highlighted cell is what it should be returning but it's not)
0 BD From1 Bd2 BD From3 BD From4 BD FromMarker TypeABS ValueCodeRatingBedroomsRent Max
blu_square1500CC-ALT-59 LCC31500
1502blu_square2CC-ALT-3707AA
1470blu_square30CC-ALT-3707DD
1503blu_square3CC-ALT-3740AA
200buildings1500CC--4032AA
1455buildings45CC-VIL-4130AA
buildings1500CC--2911BB
335502ylw_circle998CC-ASP-3201BB
675733886ylw_circle614CC-ASP-2195AA
5528007061700purple_square200CC-DEI-2791AA
5226207462900purple_square1400CC-DEI-2122AA
7807161400purple_square100CC-DEI-1011BB

<colgroup><col style="width: 100px"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"></colgroup><tbody>
</tbody>

I don't know if this is allowed or not, but I'm going to create a new thread based on this issue but PLEASE let me know if you or anyone else has any thoughts!

Thank you
 
Upvote 0
See if this works.
NOTE: this is an array formula and must be entered with
Excel Workbook
HIJKLMNOPQRS
10 BD From1 Bd2 BD From3 BD From4 BD FromMarker TypeABS ValueCodeRatingBedroomsRent Max
2blu_square1500CC-ALT-59 LCC31500
31502blu_square2CC-ALT-3707AA
41470blu_square30CC-ALT-3707DDCC-VIL-4130
51503blu_square3CC-ALT-3740AA
6200buildings1500CC--4032AA
71455buildings45CC-VIL-4130AA
8buildings1500CC--2911BB
9335502ylw_circle998CC-ASP-3201BB
10675733886ylw_circle614CC-ASP-2195AA
115528007061700purple_square200CC-DEI-2791AA
125226207462900purple_square1400CC-DEI-2122AA
137807161400purple_square100CC-DEI-1011BB
CTRL-SHIFT-ENTER.
 
Upvote 0
You're welcome. Glad that did the trick. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,772
Members
449,049
Latest member
greyangel23

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