Searched for videos, tutorials, etc as I might, I can't find the answer.

%3CLINGO-SUB%20id%3D%22lingo-sub-1320169%22%20slang%3D%22en-US%22%3ESearched%20for%20videos%2C%20tutorials%2C%20etc%20as%20I%20might%2C%20I%20can't%20find%20the%20answer.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1320169%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20Customer%20Master%20list%20where%20they%20are%20labelled%20with%20a%20region%20in%20column%20P%2C%20subregion%20column%20Q.%26nbsp%3B%20Pricing%20is%20based%20on%20the%20column%20P%2C%20pulling%20the%20prices%20from%20a%20separate%20sheet%20using%20IF()%2C%20unless%20there%20is%20a%20value%20in%20the%20subregion%20column%20Q.%26nbsp%3B%20If%20Q%20has%20a%20value%2C%20I%20have%20to%20manually%20enter%20it%20in%20because%20I%20can%20not%20figure%20out%20an%20IF%20or%20MATCH%20or%20INDEX%20formula%20that%20will%20allow%20me%20to%2C%20based%20on%20the%20value%2C%20search%20the%20next%20sheet%20for%20data%20in%20the%20column%20next%20to%20the%20matching%20value.%26nbsp%3B%20Cell%20Q10%20for%20example%2C%20is%20subregion%201aa.%26nbsp%3B%20I%20would%20like%20it%20to%20pull%20the%20information%20from%20Sheet%202%2C%20B8%20(1aa)%20and%20enter%20the%20value%20from%20C8%20into%20Sheet%201%2C%20AK10%20(%24price).%20Q80%20is%202dd%2C%20so%20AK80%20will%20read%20(%24price)%20from%20Sheet%202.%26nbsp%3B%20Etc.%3C%2FP%3E%3CP%3EI%20tried%20a%20bunch%20of%20MATCH%20%26amp%3B%20INDEX%20formats.%26nbsp%3B%20I%20have%20six%20IF%20variables%20so%20far%20for%20the%20regular%20regions%20but%20in%20total%20there%20are%2050%20price%20variables%20with%20the%20subregions.%26nbsp%3B%20PLEASE%20HELP!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1320169%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1320172%22%20slang%3D%22en-US%22%3ERe%3A%20Searched%20for%20videos%2C%20tutorials%2C%20etc%20as%20I%20might%2C%20I%20can't%20find%20the%20answer.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1320172%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F628561%22%20target%3D%22_blank%22%3E%40Otto_Rayne%3C%2FA%3E%3C%2FP%3E%3CP%3EMe%20again.%26nbsp%3B%20The%20first%20time%20I%20tried%20it%20said%20SPILL.%26nbsp%3B%20I%20got%20REF%20and%20N%2FA.%26nbsp%3B%20Then%20at%20one%20point%20I%20was%20getting%20the%20row%20number.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1320198%22%20slang%3D%22en-US%22%3ERe%3A%20Searched%20for%20videos%2C%20tutorials%2C%20etc%20as%20I%20might%2C%20I%20can't%20find%20the%20answer.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1320198%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F628561%22%20target%3D%22_blank%22%3E%40Otto_Rayne%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20VLOOKUP%20to%20infill%20the%20column.%26nbsp%3B%20It%20worked.%26nbsp%3B%20I%20can%20merge%20P%20%26amp%3B%20Q%20now%20but%20column%20AI%20used%20column%20P%20so%20I'll%20have%20to%20jig%20something%20up%20for%20it.%26nbsp%3B%20VLOOKUP%20doesn't%20look%20left%20so.....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1320246%22%20slang%3D%22en-US%22%3ERe%3A%20Searched%20for%20videos%2C%20tutorials%2C%20etc%20as%20I%20might%2C%20I%20can't%20find%20the%20answer.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1320246%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F628561%22%20target%3D%22_blank%22%3E%40Otto_Rayne%3C%2FA%3E%26nbsp%3BSince%20you%20had%20%26nbsp%3Ba%20%23SPILL!%20error%20you%20are%20on%20a%20modern%20version%20of%20Excel%20and%20you%20probably%20have%20access%20to%20the%20new%20XLOOKUP%20function.%20That%20function%20might%20help%20you%20solve%20your%20problem.%20But%2C%20INDEX%20and%20MATCH%20should%20also%20be%20able%20to%20do%20the%20trick.%20If%20you%20still%20can't%20get%20it%20to%20work%2C%20please%20upload%20an%20example%20of%20your%20workbook%20(the%20real%20thing%2C%20stripped%20from%20any%20confidential%20information).%20Then%20it%20will%20be%20much%20easier%20to%20come-up%20with%20a%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1323186%22%20slang%3D%22en-US%22%3ERe%3A%20Searched%20for%20videos%2C%20tutorials%2C%20etc%20as%20I%20might%2C%20I%20can't%20find%20the%20answer.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1323186%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%3EExcellent.%20Thanks.%26nbsp%3B%20I%20used%20the%20XLOOKUP.%26nbsp%3B%20It%20worked.%20Unfortunately%20I%20realized%20I%20can't%20delete%20the%20extra%20column%20because%20it%20is%20how%20I%20sort%20it.%26nbsp%3B%20The%20values%20ending%20in%20aa%2C%26nbsp%3B%20gg%2C%20etc%20end%20up%20at%20the%20bottom.%20These%20are%20the%202%20forumlas%20I%20used%20for%20the%20respective%20columns.%26nbsp%3B%3C%2FP%3E%3CP%3E%3DXLOOKUP(%5B%40Distance%5D%2C%20PP!%24B%243%3A%24B%2455%2C%20PP!%24C%243%3A%24C%2455)%3C%2FP%3E%3CP%3E%3DIF(%5B%40Distance%5D%3D1%2CPP!%24E%243%2C%20IF(%5B%40Distance%5D%3D2%2CPP!%24E%244%2CIF(%5B%40Distance%5D%3D3%2CPP!%24E%245%2CIF(%5B%40Distance%5D%3D4%2CPP!%24E%246%2C%20IF(%5B%40Distance%5D%3D5%2C%20PP!%24E%247%2C%20XLOOKUP(%5B%40Distance%5D%2C%20PP!%24B%248%3A%24B%2455%2CPP!%24A%248%3A%24A%2455))))))%3C%2FP%3E%3CP%3EI've%20learned%20a%20lot%20more%20these%20couple%20of%20days.%26nbsp%3B%20I%20keep%20learning%20new%20formulas%20and%20hacks.%26nbsp%3B%20I%20love%20it.%20Thanks%20for%20the%20suggestion.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1323402%22%20slang%3D%22en-US%22%3ERe%3A%20Searched%20for%20videos%2C%20tutorials%2C%20etc%20as%20I%20might%2C%20I%20can't%20find%20the%20answer.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1323402%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F628561%22%20target%3D%22_blank%22%3E%40Otto_Rayne%3C%2FA%3E%26nbsp%3BYou're%20welcome!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I have a Customer Master list where they are labelled with a region in column P, subregion column Q.  Pricing is based on the column P, pulling the prices from a separate sheet using IF(), unless there is a value in the subregion column Q.  If Q has a value, I have to manually enter it in because I can not figure out an IF or MATCH or INDEX formula that will allow me to, based on the value, search the next sheet for data in the column next to the matching value.  Cell Q10 for example, is subregion 1aa.  I would like it to pull the information from Sheet 2, B8 (1aa) and enter the value from C8 into Sheet 1, AK10 ($price). Q80 is 2dd, so AK80 will read ($price) from Sheet 2.  Etc.

I tried a bunch of MATCH & INDEX formats.  I have six IF variables so far for the regular regions but in total there are 50 price variables with the subregions.  PLEASE HELP!

5 Replies
Highlighted

@Otto_Rayne

Me again.  The first time I tried it said SPILL.  I got REF and N/A.  Then at one point I was getting the row number. 

 

Highlighted

@Otto_Rayne 

I used VLOOKUP to infill the column.  It worked.  I can merge P & Q now but column AI used column P so I'll have to jig something up for it.  VLOOKUP doesn't look left so.....

 

Highlighted

@Otto_Rayne Since you had  a #SPILL! error you are on a modern version of Excel and you probably have access to the new XLOOKUP function. That function might help you solve your problem. But, INDEX and MATCH should also be able to do the trick. If you still can't get it to work, please upload an example of your workbook (the real thing, stripped from any confidential information). Then it will be much easier to come-up with a solution.

Highlighted

@Riny_van_EekelenExcellent. Thanks.  I used the XLOOKUP.  It worked. Unfortunately I realized I can't delete the extra column because it is how I sort it.  The values ending in aa,  gg, etc end up at the bottom. These are the 2 forumlas I used for the respective columns. 

=XLOOKUP([@Distance], PP!$B$3:$B$55, PP!$C$3:$C$55)

=IF([@Distance]=1,PP!$E$3, IF([@Distance]=2,PP!$E$4,IF([@Distance]=3,PP!$E$5,IF([@Distance]=4,PP!$E$6, IF([@Distance]=5, PP!$E$7, XLOOKUP([@Distance], PP!$B$8:$B$55,PP!$A$8:$A$55))))))

I've learned a lot more these couple of days.  I keep learning new formulas and hacks.  I love it. Thanks for the suggestion.

 

Highlighted