Hi everyone, I have a data sheet with 1801 columns the first column being X, and others Y. And I have to make global Nonlinear Gaussian fit for every 20 column and copy y0,xc,w,A to a text file after each fit. I used to do that manually with buttons but you can imagine how much time and effort it can take. So I decided to write a script which will do it automatically. My code does it for the first data set, it creates a NLFit1 sheet and then it copies fit variables to a text file from that sheet. But when it starts the second fit it gives error " Fail to update operation tree as settings of user" and it fails to create NLFit2 sheet for the second fit. Any help will be very much appreciated. Thanks a lot, Nurdan