Hello! I am new in VBA and I would like to ask a simple question.
I have the row data obtained from measurement. The data are in column A and B of the worksheet. But I don't know how many rows are there.
I have to take cells of column B and calculate the average, but the problem is that I have to use a loop, which at first calculates the average of first two cells, after that 3 cells and etc.(for example first loop execution calculate average of B1, second loop execution-average of B1 and B2, third loop execution-average of B1,B2 and B3 and s.o.). Every time the average have to be compared to the value of the next cell(example averager of B1:B10 to be compared ti B11). The loop have to be executed until the difference between the average and next cell value(B11-avrg(B1:B10)) becomes greater than 0,0004.
As the result I have to obtain the average and the number ot averaged cells.
Can anybody suggest me the solution of my problem?
Thanks in advance.