Find Column Value from Lookups

RazzPrince

New Member
Joined
May 1, 2018
Messages
4
Many time user....first time poster :)

I am looking to return a column value from a single row based on two variable (one in rows and one in columns). Hopefully it makes more sense in the table!
I have 'over engineered' a solution but hoping for something more streamlined to save workbook bulk also looking for a non VBA solution.

Thanks if you can help!!

Ref A1556
Ref B1234
Ref C1344
Ref D1227
Ref E1777
Required Value from this rowApr18May18Jun18Jul18

<tbody>
</tbody>


So from this data I need to return the Month from the Ref in Column A and then the number from Column B to E.

So if my variable were Ref B and 3, my formula would return Jun18.
If variable Ref D and 7, this would return Jul18.

My current formula works for Ref B and 3 by doing If("Ref B"=A1,Hlookup(3,B1:E1,6),if"Ref B"=A2,Hlookup(3,B1:E1,5),ETC)).

Scratching me head on this one so would appreciate any help/ suggestions! Hopefully I am missing the obvious.


Thanks,
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
A
B
C
D
E
F
1
Ref A
1​
5​
5​
6​
2
Ref B
1​
2​
3​
4​
3
Ref C
1​
3​
4​
4​
4
Ref D
1​
2​
2​
7​
5
Ref E
1​
7​
7​
7​
6
Required Value from this row
18-Apr​
18-May​
18-Jun​
18-Jul​
7
8
Condition1Ref AFormula:
9
Condition2
1​
18-Apr​
10
Sheet: Sheet18

Formula in cell D9:
=INDEX($B$6:$E$6,MATCH($B$9,INDEX($B$1:$E$5,MATCH($B$8,$A$1:$A$5,0),0),0))
 
Upvote 0
Thanks a million for this! It makes sense now its 'spelt' out!

One more question if you can help...... If condition 2 was the number 4 (ie number less than 5), can the formula be updated to still pull back Apr-18 (if the condition is not an exact match)?
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,678
Members
449,116
Latest member
HypnoFant

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