=ARRAYFORMULA
can help with that. =ARRAYFORMULA
can be used for lots of things but one of the simplest is copying. =ARRAYFORMULA()
to do this. In the image below we write =ARRAYFORMULA(A2:A).
A2:A
is what we call an open ended reference - meaning that it starts at A2 and goes all the way to the end of A.=A2
in column 4 and then copying the formula down, we have wrapped the =A2
formula in an =ARRAYFORMULA
which allows us to apply our formula to an array of rows. Message
column that uses the Next Age
and Days Away
columns to compose a message about their upcoming birthday. We're using the formula ="Turns " & D2 & " in " & E2 & " daysโ
to calculate the message to display in cell F2
ARRAYFORMULA
and changing cell references D2
and E2
to open-ended ranges D2:D
and E2:E
, we can calculate the message for all rows.="Turns " & D2 & " in " & E2 & " daysโ
=ARRAYFORMULA("Turns " & D2:D & " in " & E2:E & " daysโ)
IF
formula that checks whether our input columns have data. Specifically, weโll require Next Age
(column D
) to be non-empty to calculate a message.=ARRAYFORMULA("Turns " & D2:D & " in " & E2:E & " daysโ)
=ARRAYFORMULA(IF(LEN(D2:D) = 0, "", "Turns " & D2:D & " in " & E2:E & " daysโ))
Message
column as the list item detail in a Birthdays Glide app to see how old our friends are, and how close their next birthday is at a glance:=ARRAYFORMULA
to copy the formula down for new rows. =if(A2>=10,"Pass","Fail").
=ARRAYFORMULA
and use open-ended references to automatically copy it down to all rows. =IF()
statement in our function we can make our function not populate rows that are empty. =ARRAYFORMULA(if(D2:D>=10,"Pass",if(D2:D="","","Fail")))
=ARRAYFORMULA(if(ISBLANK(A2:A), "","[email protected]"))
=if(ISBLANK(A2), "","[email protected]")