Issue with multiple function formula

Hi Lovely community, here is the rookie again.
I have created an embedded formula in Sheets as such:
=IF(ISBLANK(G89),“VACANT”,IF(AND(G89<now(),K89>now()),“OCCUPIED”,“VACANT”)). It works fine.
However, I would like to know how to apply it automatically in the whole column in my spreadsheet. So far, everytime I add a new row, I have to copy the form in the cell.
Any tips ?

I’m assuming you want to apply from row 2, and name the column “StatusCheck”. Apply this to cell G1.

={"StatusCheck";ARRAYFORMULA(IF(ISBLANK(G2:G),“VACANT”,IF((G2:G<now())*(K2:K>now())=1,“OCCUPIED”,“VACANT”))}

I am having an error message. Maybe I should paste it in G2. my brain is going spaghetti

Are you from a country that uses “;” as delimiter instead of “,” in the formulas?

we use ; indeed

From looking at your screenshot, please try this first. The double quotation marks around the “OCCUPIED” and “VACANT” doesn’t look right. Please delete them and make the quotation look like the quotation marks around the StatusCheck.

Hi,

I have made the necessary changes but I am having following error message :
“The result could not be expanded automatically. Please insert new lines (1)”
I have tried in a different spreadsheet so that I do not mess up my app :slight_smile:

Can you try deleting the formula in row 2? What did it return when you only have it in row 1?

just tried. It only applies in first row.
I tried to insert a line in between but still nothing. Argh. I am not even half way through my app.

Can you share a copy of that sheet with edit access to ariesarsenal@gmail.com? I will take a look later tonight when I get back to the laptop.

I just shared it, thank you for your support. Appreciate it.

Have you tried to do any of this in the glide data editor, or do you need these values to be in the sheet?

No, I have not tried in data editor directly. how should I do ? I have not entered a formula in data editor so far. If you could teach me that would be great.

https://docs.glideapps.com/all/reference/data-editor/computed-columns/if-then-else

you rock, thank you very much. You sorted me out big time

1 Like

I have also fixed the formula in the Sheet you shared with me in case you need it, please have a look.

1 Like

Did you already share it with me?

I fixed it in the sheet you shared with me.

1 Like

Many thanks for your support, it’s perfect

1 Like

Hi, I have tried to set up the same formula in the data editor but the ‘’ if-then-else’’ column only uses 1 column as reference whereas my condition uses data from 2 different columns.