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!!
[TABLE="width: 500"]
<tbody>[TR]
[TD]Ref A[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref B[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref C[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref D[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref E[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]7[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Required Value from this row[/TD]
[TD]Apr18[/TD]
[TD]May18[/TD]
[TD]Jun18[/TD]
[TD]Jul18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
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,
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!!
[TABLE="width: 500"]
<tbody>[TR]
[TD]Ref A[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref B[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref C[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref D[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ref E[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]7[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Required Value from this row[/TD]
[TD]Apr18[/TD]
[TD]May18[/TD]
[TD]Jun18[/TD]
[TD]Jul18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
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,