简体   繁体   中英

ArrayFormula + simple if statement on Google Forms

I am building a worksheet that takes form-submitted data and runs a few calculations. I am having trouble autopopulating cells with simple if statements. I am wondering about how to use ArrayFormula with a statement like:

=IF(J2<I2+1,1,0)

Or, even more complicated, an IF statement and a VLOOKUP:

=IF(H2+K2=2,VLOOKUP(F2,'Event Info'!A2:D7,4,False),"Message")

Thanks!

These formulae may work as you want. The LEN(A2:A) section checks your column A and will only output if there is a timestamp value from the Form :

=ArrayFormula(IF(LEN(A2:A),IF(J2:J<I2:I+1,1,0),))

=ArrayFormula(IF(LEN(A2:A),IF(H2:H+K2:K=2,VLOOKUP(F2:F,'Event Info'!A2:D7,4,0),"Message"),))

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