cfdh_edmundo
Board Regular
- Joined
- Nov 9, 2005
- Messages
- 133
Hi,
I have the following code which calculates a weighted average:
It works very well except that I would like it to ignore blank cells in the range $AB$2:$AB$1203
I tried to change it to the following code
But this doesn't work and just gives me zero for everything.
If anyone could let me know how I do this that would be great.
Many thanks!
I have the following code which calculates a weighted average:
Rich (BB code):
=SUMPRODUCT(--($U$2:$U$1203=AE3),$AB$2:$AB$1203,$C$2:$C$1203)/SUMIF($U$2:$U$1203,AE3,$C$2:$C$1203)
It works very well except that I would like it to ignore blank cells in the range $AB$2:$AB$1203
I tried to change it to the following code
Rich (BB code):
=SUMPRODUCT(--($U$2:$U$1203=AE3),$AB$2:$AB$1203,(LEN($AB$2:$AB$1203)>0),$C$2:$C$1203)/SUMIF($U$2:$U$1203,AE3,$C$2:$C$1203)
But this doesn't work and just gives me zero for everything.
If anyone could let me know how I do this that would be great.
Many thanks!