Hi,
Need to write script to realize this. Please start a new worksheet and put your data in col(A) and col(B). With the worksheet activated, select menu Window: Script Window.... Copy paste the following script over, select all and hit Enter to run the script.
function dataset GetIDs(dataset ds1, dataset ds2, dataset ds3)
{
int idx1 = 1;
dataset ds4;
ds4.SetSize(ds3.GetSize());
int i = 1;
for (; i <= ds3.GetSize()-1; i++)
{
int count = 0;
for (;ds1[idx1]> ds3[i] && ds1[idx1]< ds3[i+1];idx1++)
{
count += ds2[idx1];
}
ds4[i] = count;
}
ds4[i] = 0;
return ds4;
}
wks.nCols = 2;
wks.nCols = 4;
range r1 = col(A);
range r2 = col(B);
range r3 = col(C);
range r4 = col(D);
r3 = data(floor(min(r1)), ceil(max(r1)));
r4 = GetIDs(r1, r2, r3);