# Thread: Using Index/Match with an IF Statement??? Thanks: 0 Likes: 0

1. ## Using Index/Match with an IF Statement???

I don't know if it is possible, but is there a way to use index/match in an IF statement? Or maybe something else will work. I have a range of A5:F250 with a list of events for different entries.

Column A = First Names
Column B = Last Names
Column D = Name of Events (Birthday, Deceased, Etc.)
Column F = Days Until Next Event

I would like to place a zero in Column F of a persons birthday row if the first name, last name and the word Deceased are in the same row some where else. Otherwise I will calculate the number of days until the next birthday. I have a formula for that. I just need to get there in an IF statement. Below is a formula I tried but was called volatile by Excel.

=IFERROR(IF(C5="","",IF(INDEX(\$C5:\$C\$250,MATCH(1,(A5=\$A\$5:\$A\$250)*(B5=\$B\$5:\$B\$250)*("Deceased"=\$D\$5:\$D\$250),0))=C5,0,IF(I5>TODAY(),DATEDIF(TODAY(),I5,"YD"),DATEDIF(TODAY(),K5,"YD")))),"N/A")

Thanks to all for all the help in the past and for any help here.  Reply With Quote

2. ## Re: Using Index/Match with an IF Statement???

Try like this  Reply With Quote

3. ## Re: Using Index/Match with an IF Statement???

Thank you, that actually put 0 in both the birthday and deceased rows which makes more sense. I might mention that is the days until column that I am putting it in.
And thank you for a lesson on COUNTIFS, I see more uses for it now.  Reply With Quote

4. ## Re: Using Index/Match with an IF Statement???

You're welcome.   Reply With Quote

## User Tag List

birthday, column, formula, names, statement 