Referred from-

I want to add formula in G4 to add values from cell range D424
where Text of C4:C24 matches with G3 and
Number of cell summed should be upto C1.(Means if c1 is 4 should add first 4 values only)
Please see Image for explanation.

Right now I am using
Click image for larger version. 

Name:	tt.JPG 
Views:	8 
Size:	49.8 KB 
ID:	1999