Hi MilkoMeda,
You can run the following script, assuming your data is stored in col(A) in Book1, and col(A) in
Book2 contains the row# 's of bin boundaries. For example, when [Book2]!col(A) has {1, 5, 10, 20},
the means of bins correspond to: 1...5, 5...10, and 10...20.
////////////////////////////////////////////////////////
range r2A=[Book2]1!col(A); //Bin boundaries
range r2B=[Book2]1!col(B); //Output column
nbin=r2A.getSize(); //number of bins
for(ibin=1; ibin<nbin; ibin++) { //Repeat times of bins
range rv=[Book1]1!col(A)[$(r2A[ibin]):$(r2A[ibin+1])]; //Target range
r2B[ibin]=mean(rv); //Assign mean value
}
////////////////////////////////////////////////////////
The output would be stored in col(B) of Book2.
Hope this helps.
--Hideo Fujii
OriginLab