Lookup heirarchy Value in Multiple Columns and Return Value from Column

venkyzrocks

New Member
Joined
Oct 4, 2009
Messages
39
Struggling with an Index Match on this lookup since if need to return the lowest level child

Lookup to look value "Miami" (dynamic) in Multiple columns lets says column Column1,Column2,Column3 and
then return lookup value from Lookup columns starting the search from the last column3 in this case and
then going backwards till a value is found. Attaching the excel sheet as well.


Excel.xlsx
ABCDEFGHIJ
1ValueReturn Value Cell (Return last Value)ColumnColumn2Column3Lookup Column1Lookup Column2Lookup Column3
2MiamiR1 - Since R3,R2 are emptyNew1MiamiReraR1
3MiamiR2- Since R3 is emptyNew2AbcMiamiR1R2
4MiamiR3 New1MiamiReraR1R2R3
5
Sheet1
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Not sure I understand what's being asked for.
Isn't this just find the last non blank in columns H to J?
In which case

Try
=INDEX(A2:J2,SUMPRODUCT(MAX((H2:J2<>"")*COLUMN(H2:J2)),1))
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

I'm not sure what, if anything, columns D, E & F have to do with it? If those columns are relevant, please explain in what way.
Otherwise, is this what you want?

24 02 05.xlsm
BCGHIJ
1Return Value Cell (Return last Value)Lookup Column1Lookup Column2Lookup Column3
2R1R1
3R2R1R2
4R3R1R2R3
Lookup Last
Cell Formulas
RangeFormula
B2:B4B2=LOOKUP("zzz",H2:J2)
 
Upvote 0
Aplogies, the value $A2 looks up in row D,E,F and returns th first non blank value (starting from J, then I, then H). Needs Iindex Match, not just lookup. Hope this helps.

Equivalent of this in lookup terms would be =vlookup($A2, $D:$F (But where the value lies is uncertain), Return (non;blank in reverse order), false)
 
Upvote 0
the value $A2 looks up in row D,E,F and returns th first non blank value (starting from J, then I, then H).
I don't understand that. Which of the answers in my post are incorrect and what should those answers be instead, and why?
 
Upvote 0
instead of an index match you could use this formula instead. When testing against your data it returned the correct value. If you're expecting something else, please confirm the expected output
Excel Formula:
In Cell B2
=IF(COUNTIF(D2:F2,A2)<>0,OFFSET(J2,0,-COUNTBLANK(H2:J2)),"")
 
Upvote 0
First of all D, E, F are columns not Rows.
Secondly as stated by Peter_SSs, what is the purpose of columns D E and F ?
In regards to the results you have in column B, columns D, E, and F are irrelevant to obtaining those results.
ie
If you deleted columns D, E, and F you could still get the same results in B just by looking at H, I, J.
So what purpose does D, E and F serve?
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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