Forum Discussion

waterfall396's avatar
waterfall396
Copper Contributor
Feb 07, 2017

combining two Index(Match) functions into an IF function

I have two INDEX&MATCH fuctions that return valid results by themselves.  The result is in mm/dd/yyyy format.

{=INDEX(Sheet3!C:I,MATCH(1,(Sheet3!F:F=D27)*(Sheet3!C:C="2B1047"),0),7)}
{=INDEX(Sheet3!C:I,MATCH(1,(Sheet3!F:F=D27)*(Sheet3!C:C="2B1047"),0),5)}

 

I want to combine those into an =IF(x,y,z) function that compares the first function > today's date and if true returns the first function.  If false returns the second function.

 

I have tried the following with the result being #N/A:

=IF(INDEX(Sheet3!C:I,MATCH(1,(Sheet3!F:F=D27)*(Sheet3!C:C="2B1047"),0),7)>TODAY(),INDEX(Sheet3!C:I,MATCH(1,(Sheet3!F:F=D27)*(Sheet3!C:C="2B1047"),0),7),INDEX(Sheet3!C:I,MATCH(1,(Sheet3!F:F=D27)*(Sheet3!C:C="2B1047"),0),5))

 

 

 

  • waterfall396's avatar
    waterfall396
    Copper Contributor

    I really though I was stuck but now I feel silly. 

     

    Solution was to ctrl+shift+enter to make the { } appear around the formula. 

Resources