SOLVED

IF and INDEX/MATCH help

Copper 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 (Copper 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.

1 best response

Accepted Solutions
best response confirmed by kroghr (Copper 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)))

View solution in original post