Elliot Stratton
Elliot Stratton

Reputation: 21

Index match formula with IF statement

I am having an issue with a formula for google sheets:

=ifna(IF($A14="TRP Drills",INDEX('Drills DD Skill by Skill'!$B$3:$B,match($D14,'Drills DD Skill by Skill'!$A$3:$A,0))*$F14," "),if($A14="DMT Drills",INDEX('DMT Drills DD Skill by Skill'!$B$3:$B,match($D14,'DMT Drills DD Skill by Skill'!$A3:$A,0))*$F14,""))

This is working for the first If rule “TRP Drills” but it isn’t working when I change A14 to the second If rule “DMT Drills”

Can anyone see any reasons why this may be not working ?

Upvotes: 0

Views: 415

Answers (1)

Marios
Marios

Reputation: 27350

The first argument in infa() will not evaluate to NA since you are returning " " when it evaluates to false.

Try the following:

=iferror(ifna(IF($A14="TRP Drills",INDEX('Drills DD Skill by Skill'!$B$3:$B,match($D14,'Drills DD Skill by Skill'!$A$3:$A,0))*$F14,na()),if($A14="DMT Drills",INDEX('DMT Drills DD Skill by Skill'!$B$3:$B,match($D14,'DMT Drills DD Skill by Skill'!$A3:$A,0))*$F14,"")),"")

Upvotes: 2

Related Questions