# Automatically update formula when a new row of data is added

1. ## Automatically update formula when a new row of data is added

i am trying to automatically update a formula each time a new row is added. For the columns that have a simple formula arrayformula works well, but some of the columns have a larger formula which contains larger formulas like column L2 which has the following =NOT(OR(L\$1>\$F2,EOMONTH(L\$1,0)<\$E2))*(MIN(EOMONTH(L\$1,0)+1,\$F2)-MAX(L\$1,\$E2)) the formula does not work

I have attached the sample google sheet for your reference. i woul like column L to automatically update when a new row is added

2. ## Re: Automatically update formula when a new of of data is added

Is it possible for you to explain in plain words what you are trying to accomplish with the formula you have in cell L2 and what your expected results are?

3. ## Re: Automatically update formula when a new of of data is added

each guest has a checkin date E2 and checkout date F2. The formula in L2 first checks how many days of the particular booking is in the month
of March R2 and how many days in April and so on

For example
Checkin Checkout Price March March Revenue April April Revenue
31/03/2021 05/04/2021 1000 1 1000 4 40000

the guest stays 1 day in march hence March revenue is 1000, and the guest stays 4 days in april (as checkout date is not counted) hence the
revenue is Rs 4000

I hope i am more clear this time around. Thank you so mcuh for your help

There are currently 1 users browsing this thread. (0 members and 1 guests)