Hi,
I use a variation of this formula quite a lot.. essentially a sumifs (or countifs) surrounded by a sumproduct to use the range in one of the criteria instead of stacking several lookups together..
=SUMPRODUCT(SUMIFS(RAWDATA!$D:$D,RAWDATA!$A:$A,$A$40:$A$46,RAWDATA!$BR:$BR,B$4))
Where the...