SOLVED

IF and INDEX/MATCH help

%3CLINGO-SUB%20id%3D%22lingo-sub-1584050%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20and%20INDEX%2FMATCH%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1584050%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F756946%22%20target%3D%22_blank%22%3E%40kroghr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20not%20check%20the%20index%20match%2C%20part%2C%20just%20put%20your%20code%20in%20an%20if%20statement!%3C%2FP%3E%3CP%3EIt%20seems%20there%20is%20a%20difference%20between%20202%20and%20201%20sheets%20though%3C%2FP%3E%3CP%3Ehere%20is%20what%20I%20did!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20L17%3C%2FP%3E%3CP%3E%3DIF(%24C%243%3D202%2C%3CBR%20%2F%3EINDEX('APG%20TO%20202'!%24B%242%3A%24BQ%2435%2CMATCH(CALC!F17%2C'APG%20TO%20202'!%24A%242%3A%24A%2435%2C0)%2CMATCH(CALC!H17%2C'APG%20TO%20202'!%24B%241%3A%24BQ%241%2C0))%2C%3CBR%20%2F%3EINDEX('APG%20TO%20201'!%24B%242%3A%24BQ%2435%2CMATCH(CALC!F17%2C'APG%20TO%20201'!%24A%242%3A%24A%2435%2C0)%2CMATCH(CALC!H17%2C'APG%20TO%20201'!%24B%241%3A%24BQ%241%2C0)))%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1584073%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20and%20INDEX%2FMATCH%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1584073%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F746148%22%20target%3D%22_blank%22%3E%40ramizassaf%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much.%20That%20works%20perfectly.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1583963%22%20slang%3D%22en-US%22%3EIF%20and%20INDEX%2FMATCH%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583963%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20write%20an%20IF%2C%20INDEX%2FMATCH%20formula%20in%20Cell%20L17.%20I%20have%20the%20INDEX%2FMATCH%2C%20already%20but%20having%20trouble%20with%20the%20IF%20part.%20I%20want%20the%20INDEX%2FMATch%20formula%20to%20run%20on%20worksheet%20%22APG%20TO%20202%22%20if%20202%20is%20in%20cell%20C3%20and%20%22APG%20TO%20201%22%20to%20run%20if%20201%20is%20in%20cell%20C3.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20attached%20my%20workbook.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EReally%20appreciate%20any%20help%20you%20can%20offer.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1583963%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I'm trying to write an IF, INDEX/MATCH formula in Cell L17. I have the INDEX/MATCH, already but having trouble with the IF part. I want the INDEX/MATch formula to run on worksheet "APG TO 202" if 202 is in cell C3 and "APG TO 201" to run if 201 is in cell C3.

 

I have attached my workbook.

 

Really appreciate any help you can offer.

2 Replies
Best Response confirmed by kroghr (New Contributor)
Solution

@kroghr 

I did not check the index match, part, just put your code in an if statement!

It seems there is a difference between 202 and 201 sheets though

here is what I did!

 

in L17

=IF($C$3=202,
INDEX('APG TO 202'!$B$2:$BQ$35,MATCH(CALC!F17,'APG TO 202'!$A$2:$A$35,0),MATCH(CALC!H17,'APG TO 202'!$B$1:$BQ$1,0)),
INDEX('APG TO 201'!$B$2:$BQ$35,MATCH(CALC!F17,'APG TO 201'!$A$2:$A$35,0),MATCH(CALC!H17,'APG TO 201'!$B$1:$BQ$1,0)))

@Ramiz_Assaf 

 

Thank you very much. That works perfectly.