Referencing above/below based on two column values

y3tter

Board Regular
Joined
Nov 11, 2012
Messages
147
I'm trying to reference Above/Below by looking at column range AF48:AF61 and looking for the word "Red". The second reference is "Base" in column range AH48:AH61. If Red is in a Row above Base, I want to return the value "Above", if Red is in a row equal or below Base, I want to return "Below". Below are three examples. Is there an easy way to accomplish this?

1. Return "Above"
2. Return "Below"
3. Return "Below"

Red
Base

<tbody>
</tbody>

RedBase

<tbody>
</tbody>


Base
Red

<tbody>
</tbody>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi,

Here are 2 options in case there is red above & below :

AI48 =IF(AH48="Base",LOOKUP("Red",AF47:AF49,{"Above","Below","Below"}),"")



AJ48 =IFERROR(LOOKUP(IF(AH48="Base",SUMPRODUCT(--("Red"=AF47:AF49),ROW($A$2:$A$4)),""),ROW($A$2:$A$9),{"Above","Below","Below","Above & Below","Above & Below","Below","","Above & Below"}),"")

AFAGAHAIAJ
48Red
49BaseAboveAbove
50
51RedBaseBelowBelow
52BaseBelowAbove & Below
53Red
54BaseAboveAbove
55
56Red
57BaseAboveAbove
58
59Red
60RedBaseBelowAbove & Below
61Red

<colgroup><col span="5"><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,891
Members
449,058
Latest member
Guy Boot

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