Artur
Artur

Reputation: 345

Put formula in cell if another cell is not empty

There is an Amazon extension that periodically puts some data to Google sheet.

As I understand it checks each row, and when find an empty one, puts there data.

It fills, say, 2 cells in a row, and I need to put some formula to the 3th cell:

   1             2              3
A  ...           ...            ...
B  DatFrAmzn1    DatFrAmzn2     MyFormula
C  ...           ...            ...

But if I just fill all X3 cells with formula I need, Amazon will not put data to that X rows, because they are not completely empty.

So I need the formula to be entered after Amazon fills the row.

If there is a Google script function or expression, that puts formula in empty cell, if the condition is met, please point me.

Upvotes: 1

Views: 70

Answers (1)

Jeff Gibson
Jeff Gibson

Reputation: 478

In the range class there is a function built in called setFormula that handles exactly what you're looking for.

You would want to set it to a trigger that fires whenever the page is edited.

Upvotes: 1

Related Questions