简体   繁体   中英

How to ArrayFormula in Google Sheets with multiple IF AND OR conditions?

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

What else should I do?

点击此处查看图片

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.

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) 
  ) 
)

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 +

Got the rights answer

thank you so much guys

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM