Thread: search and sum
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default search and sum

You can use SUMIF( ) to do this. If you enter stock code in A1 then in
C1 enter the formula:

=SUMIF(A2:A2000,A1,C1:C2000)

(from your description I think quantity will be in column C, but you
can put this in B1 instead if you want to). Similarly, if amount is in
column D, enter this is D1:

=SUMIF(A2:A2000,A1,D1:D2000)

I've assumed the data extends to row 2000 - adjust if necessary. Not
sure what you want to do with the days information in your posting.

Hope this helps.

Pete