Orekin ,
I have written two small VBA UDF's to solve a problem that I could not
solve through standard excel functions.
Good News!
these CAN simply be done in standard worksheetfunction..
it's no more then a multi column lookup..
enter in c2:
=SUMPRODUCT(--($A2=$H$2:$H$21),$I$2:$I$21)
copy it down the column..
and you're done :)
of course you could make it nicer by adding
some names...
names define..
CNnrs = offset($h$1,1,0,counta($h:$h)-1,1)
CNamt = offset(cnnrs,0,1)
now in c2 = SUMPRODUCT(--(A2=cnnrs),cnamt)
excel can be simple.. you just gotta learn how:)
<vbg
keepITcool
< email : keepitcool chello nl (with @ and .)
< homepage:
http://members.chello.nl/keepitcool