Home > Software design >  How to ArrayFormula in Google Sheets with multiple IF AND OR conditions?
How to ArrayFormula in Google Sheets with multiple IF AND OR conditions?

Time:01-12

Can someone please help me? I can't get seems to work it.

What else should I do?

Click here for picture

Here is my code

=ARRAYFORMULA(IF(AND(Y2:Y="VUL",L2:L="ANNUAL"),V2:V*0.03,IF(AND(Y2:Y="VUL",L2:L="QUARTERLY"),V2:V>0,IF(AND(Y2:Y="VUL",L2:L="SEMI ANNUAL"),V2:V*AB2:AB,"0"))))

The results must be from 2nd row to last but only works only for 2nd row.

CodePudding user response:

Use ifs(), like this:

=arrayformula( 
  ifs( 
    Y2:Y <> "vul", iferror(1/0),
    L2:L = "annual", V2:V * 0.03, 
    L2:L = "quarterly", V2:V > 0, 
    L2:L = "semi annual", V2:V * AB2:AB, 
    true, iferror(1/0) 
  ) 
)

CodePudding user response:

use:

=ARRAYFORMULA(IF((Y2:Y="VUL")*(L2:L="ANNUAL"), V2:V*0.03,
 IF((Y2:Y="VUL")*(L2:L="QUARTERLY"), V2:V>0,
 IF((Y2:Y="VUL")*(L2:L="SEMI ANNUAL"), V2:V*AB2:AB, "0"))))

AND is *

OR is

  • Related