=IF(Not(A16=0);sum.product((sheet1!$C$1:$C$2000=A16)*(offset(sheet1!$C$1:$C$2000;0;2;;month)))/offset(currency;currencyno;month);0)

the problem is the last part (/offset(currency;currencyno;month)

let's assume that

sheet 1= database sheet (product list ..say computers A,B..)
look for ( in sheet 2) a16 in sheet 1 (say A16=computer A)

i assume that if i choose month 6 (june) then "sum" until june starting from jan

it is ok with this formula

second part is the problem

i create a combo box (there you can choose currencies) when i choose euro
the formula divides whole sum to the june'th parity

but what i want is divide any months parity to its month and sum that way