SOLVED

Reverse H Look Up

%3CLINGO-SUB%20id%3D%22lingo-sub-1795464%22%20slang%3D%22en-US%22%3EReverse%20H%20Look%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1795464%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Every%20one%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20some%20data%20in%20the%20attached%20excel%20in%20Table%201%20-%20I%20need%20to%20bring%20the%20place%20(Yellow%20Colored)%20for%20each%20achieve%20data%20from%20the%20data%20table%201.%3C%2FP%3E%3CP%3ETechnically%20a%20%22Reverse%20Hlook%20Up%22.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20with%20offset%20and%20match%2C%20index.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20body%20can%20help%20me%20to%20set%20a%20formula%20for%20this.%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1795464%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1795669%22%20slang%3D%22en-US%22%3ERe%3A%20Reverse%20H%20Look%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1795669%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420510%22%20target%3D%22_blank%22%3E%40Sameer_Kuppanath_Sulta%3C%2FA%3E%26nbsp%3B%20i%20don't%20understand%20what%20you%20are%20trying%20to%20do%20here.%26nbsp%3B%20There%20is%20no%20'place'%20in%20your%20table.%26nbsp%3B%20Also%20your%20'Achieve'%20column%20which%20appears%20to%20be%20a%20'rank'%20is%20incorrect%20in%20that%20it%20does%20not%20account%20for%20multiple%20entries%20with%20the%20same%20value%20(unless%20that%20is%20what%20you%20wanted%3F).%26nbsp%3B%20A%20better%20'rank'%20formula%20would%20be%20to%20use%20LARGE%20i.e.%20%3DLARGE(B3%3AB17%2CH7)%3C%2FP%3E%3CP%3EIn%20order%20to%20get%20a%20column%20ranked%20based%20on%20a%20different%20column%20you%20could%20use%20a%20formula%20like%20the%20following%20if%20you%20a%20have%20the%20newest%20functions%20in%20Excel%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDEX(SORT(%24B%243%3A%24C%2417%2C1%2C-1)%2CH7%2C2)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ewhere%20I%20return%20column%202%20from%20the%20range%20B3%3AC17.%26nbsp%3B%20If%20you%20wanted%20a%20different%20column%20you%20would%20expand%20the%20range%20and%20adjust%20that%20last%20index%20from%202%20to%20which%20column%20you%20want.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1798118%22%20slang%3D%22en-US%22%3ERe%3A%20Reverse%20H%20Look%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1798118%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420510%22%20target%3D%22_blank%22%3E%40Sameer_Kuppanath_Sulta%3C%2FA%3E%26nbsp%3BPerhaps%20the%20attached%20workbook%20answers%20your%20question.%20I%20used%20MMULT%20and%20introduced%20an%20array%20(1%20row%20x%2015%20columns)%20filled%20with%20ones%2C%20to%20make%20it%20work.%3C%2FP%3E%3CP%3EIt%20works%2C%20but%20only%20if%20either%20of%20the%20top%205%20values%20falls%20in%20one%20place%20(i.e.%20one%20column).%20So%2C%20this%20is%20probably%20not%20a%20very%20useful%20exercise%20to%20begin%20with.%20Up%20to%20you%20to%20decide%20what%20to%20do%20with%20it.%3C%2FP%3E%3CP%3EOr%2C%20perhaps%20someone%20else%20has%20a%20better%20approach.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPS%3A%20Changed%20some%20numbers%20in%20various%20columns%20to%20test%20the%20formula%20and%20added%20some%20conditional%20formatting%20to%20visualise%20the%20top%205%20values.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1798203%22%20slang%3D%22en-US%22%3ERe%3A%20Reverse%20H%20Look%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1798203%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%20Hi-%20thanks%20for%20your%20input.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETwo%20things.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20I%20did%20not%20understand%20this%20formula%20MMIUT-%20I%20have%20seen%20this%20first%20time.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22(MMULT(Array1%2CIFERROR(FIND(TRUE%2CI7%3DTable1)%2C0))%26lt%3B%26gt%3B0)*COLUMN()%2C0)%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20Nevertheless%2C%20I%20have%20got%20another%20confusion%20on-%20If%20we%20add%20one%20more%20line%20item%20as%20%2216th%22%20item%2C%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20I%20have%20converted%20the%20table%20to%20Excel%20official%20Table%2C%20I%20have%20to%20update%20the%20so%20called%20%22Array%201%22%20as%20adding%201%20to%20next%20column%20for%20working%20with%20this%20formula%2C%20right%3F%3C%2FP%3E%3CP%3EI%20think%20that%20is%20too%20inconvenient%20that%2C%20every%20time%20to%20add%20%221%22%20in%20such%20a%20way%3F%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20comment%20and%20advise.!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1798232%22%20slang%3D%22en-US%22%3ERe%3A%20Reverse%20H%20Look%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1798232%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%26nbsp%3BHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20you%20did%20nt%20get%20my%20question.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst-%20The%20large%20formula%2C%20I%20cant%20use%2C%20since%20it%20is%20not%20flushing%20out%20duplicate%20values.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELately-%20I%20need%20to%20bring%20the%20places%20(College%2C%20hotel%20etc..%20)%20into%20the%20cell%20which%20is%20colored%20yellow%2C%26nbsp%3B%20representing%20the%20number%20in%20previous%20column%20(Achieve)%20from%20Data%20table.%20%2C%20not%20the%20number!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20check%20the%20attached%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1798376%22%20slang%3D%22en-US%22%3ERe%3A%20Reverse%20H%20Look%20Up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1798376%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420510%22%20target%3D%22_blank%22%3E%40Sameer_Kuppanath_Sulta%3C%2FA%3E%26nbsp%3BMy%20example%20was%20merely%20to%20demonstrate%20what%20is%20possible.%20Unfortunately%2C%20the%20MMULT%20function%20is%20not%20the%20most%20straightforward%20one.%20You%20can%20read%20all%20about%20it%20in%20the%20Excel%20help%20screens%20or%20in%20other%20on-line%20resources.%20These%20can%20explain%20the%20function%20much%20better%20than%20I%20can.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%2C%20in%20summary%2C%20MMULT%20works%20with%20two%20arrays.%20One%20is%20what%20I%20called%20Array1%2C%20the%20other%20is%20an%20array%20that%20is%20%22created%22%20by%20the%20second%20part%20(i.e.%20what%20comes%20after%20%22Array1%22.%20Once%20you%20understand%20how%20MMULT%20works%20you%20can%20break-down%20that%20%22calculation%22%20of%20the%20second%20array%20to%20find%20it%20creates%20an%20array%20(15%20rows%20x%205%20columns)%20with%20zeros%20in%20most%20cells.%20Only%20cells%20that%20match%20the%20selected%20value%20from%20column%20I%20will%20have%20a%201.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20that%20is%20where%20the%20weakness%20comes%20in.%20If%20you%20expect%20some%20of%20the%20top%205%20values%20to%20occur%20in%20more%20than%20one%20column%2C%20you%20can%20throw%20this%20whole%20approach%20away%2C%20as%20it%20will%20only%20pick-up%20the%20first%20column%20in%20which%20the%20selected%20value%20occurs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%2C%20yes%2C%20if%20you%20add%20rows%20to%20your%20table%2C%20the%20Array1%20(named%20range)%20needs%20to%20become%2016%20columns%20wide.%20If%20you%20are%20a%20recent%20Excel%20version%20with%20the%20new%20DA%20functions%20you%20can%20create%20a%20sequence%20of%20ones%20based%20on%20the%20number%20of%20rows%20in%20your%20table%20(%3CCOUNT%3E)%20and%20reference%20that%20sequence%20with%20its%20first%20cell%20followed%20by%20a%20%23.%3C%2FCOUNT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi Every one

 

I have some data in the attached excel in Table 1 - I need to bring the place (Yellow Colored) for each achieve data from the data table 1.

Technically a "Reverse Hlook Up". 

I tried with offset and match, index.

 

Any body can help me to set a formula for this. ?

 

 

 

9 Replies

@Sameer_Kuppanath_Sulta  i don't understand what you are trying to do here.  There is no 'place' in your table.  Also your 'Achieve' column which appears to be a 'rank' is incorrect in that it does not account for multiple entries with the same value (unless that is what you wanted?).  A better 'rank' formula would be to use LARGE i.e. =LARGE(B3:B17,H7)

In order to get a column ranked based on a different column you could use a formula like the following if you a have the newest functions in Excel:

=INDEX(SORT($B$3:$C$17,1,-1),H7,2)

where I return column 2 from the range B3:C17.  If you wanted a different column you would expand the range and adjust that last index from 2 to which column you want.

 

@Sameer_Kuppanath_Sulta Perhaps the attached workbook answers your question. I used MMULT and introduced an array (1 row x 15 columns) filled with ones, to make it work.

It works, but only if either of the top 5 values falls in one place (i.e. one column). So, this is probably not a very useful exercise to begin with. Up to you to decide what to do with it.

Or, perhaps someone else has a better approach.

 

PS: Changed some numbers in various columns to test the formula and added some conditional formatting to visualise the top 5 values.

@Riny_van_Eekelen  Hi- thanks for your input.

 

Two things.

 

1. I did not understand this formula MMIUT- I have seen this first time. 

 

"(MMULT(Array1,IFERROR(FIND(TRUE,I7=Table1),0))<>0)*COLUMN(),0)"

 

2. Nevertheless, I have got another confusion on- If we add one more line item as "16th" item, 

and I have converted the table to Excel official Table, I have to update the so called "Array 1" as adding 1 to next column for working with this formula, right?

I think that is too inconvenient that, every time to add "1" in such a way? 

Please comment and advise.!

 

@mtarler Hi

 

I think you did nt get my question. 

 

First- The large formula, I cant use, since it is not flushing out duplicate values.

 

Lately- I need to bring the places (College, hotel etc.. ) into the cell which is colored yellow,  representing the number in previous column (Achieve) from Data table. , not the number!!

 

Please check the attached

Best Response confirmed by Sameer_Kuppanath_Sulta (Contributor)
Solution

@Sameer_Kuppanath_Sulta My example was merely to demonstrate what is possible. Unfortunately, the MMULT function is not the most straightforward one. You can read all about it in the Excel help screens or in other on-line resources. These can explain the function much better than I can.

 

But, in summary, MMULT works with two arrays. One is what I called Array1, the other is an array that is "created" by the second part (i.e. what comes after "Array1". Once you understand how MMULT works you can break-down that "calculation" of the second array to find it creates an array (15 rows x 5 columns) with zeros in most cells. Only cells that match the selected value from column I will have a 1.

 

And that is where the weakness comes in. If you expect some of the top 5 values to occur in more than one column, you can throw this whole approach away, as it will only pick-up the first column in which the selected value occurs.

 

And, yes, if you add rows to your table, the Array1 (named range) needs to become 16 columns wide. If you are a recent Excel version with the new DA functions you can create a sequence of ones based on the number of rows in your table (<count>) and reference that sequence with its first cell followed by a #.

@Riny_van_Eekelen 

 

Thanks a lot- It worked. Please look into the attached sheet. I MADE IT!!!

 

As you said, it will not pick the second result, but its ok, this is what I need!!

 

You saved my day...!

@Sameer_Kuppanath_Sulta Well done! Consider to change the SEQUENCE formula to:

=SEQUENCE(1,COUNT(Table2[College]),1,0)

 Just think it's neater. But that's personal.

@Riny_van_Eekelen PERFECT!!

@Sameer_Kuppanath_Sulta 

Same logic but without MMULT and DA

=INDEX(Place,
   AGGREGATE(
     15,6,
     1/((Table1=I7)*COLUMN(Table1)>0)*(Table1=I7)*COLUMN(Table1),
   1)-
   INDEX(COLUMN(Table1),1)+1
)

It's here

image.png