Home > Net >  ArrayFormula forcing new data to bottom of sheet
ArrayFormula forcing new data to bottom of sheet

Time:09-18

I have made a simple user form to retrieve user info and add this to a database. The script finds the last row and adds the data to a new row, in columns A to E. The colomns F to O have formulas. To prevent to user pulling down the formulas manually, I used arrayformula. Which works fine, but together with the data from the user form it does not. When looking for the last row, the script sees the arrayformula as data and makes the new row at the end of the array. How do I prevent this? I have checked the cells, there is no value in them. It works fine when I manually pull down the formulas.

This is the format I'm using. I put in a if-test to preven zero's from showing on the sheet. =arrayformula(if(C8:C="","",C8:C*H8:H))

CodePudding user response:

change this:

=arrayformula(if(C8:C="","",C8:C*H8:H))

to this:

=arrayformula(if(C8:C="",,C8:C*H8:H))

then run the script again.

"" is not truly empty to a script, only to the eye.

  • Related