简体   繁体   中英

How do I use arrayformula on an IF formula?

How do I use arrayformula on this formula?

=if(H3-H2=0,I2+B3,B3)

I would like to apply it to the whole I column...

I am not sure I understand exactly what you are after, but try this:

=arrayformula(if((H3:H15)-(H2:H14)=0,I2+B3,B3))

If you want the same result as dragging down your formula use:

=arrayformula(if((H3:H15)-(H2:H14)=0,(I2:I15)+(B3:B15),(B3:B15)))

Here is a link to my test spreadsheet. Your formula is in L2 and mine is in M2.

https://docs.google.com/spreadsheets/d/11jC9Sku-w7BK7FmaRJ8BHXAn10d6JVl2mL_BV_XAT2E/edit?usp=sharing

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