-3

I am trying to use SUMIFS to filter my data and provide averages using the month and year stock name as criteria. I have attached a screenshot below.

enter image description here

So, if stock CKK in column A traded 5 times in 2018, I'd like a sum total of that figure in column B based on the date (column C) and stock name (column A). I've tried to write the sumifs myself but have not enjoyed much success so far, any advice on how to structure this would be appreciated.

NHure92
  • 105
  • 2
  • 9
  • 1
    Regardless of your success or not, you need to provide your code examples so that we can help. The image is not entirely useful, and the description could be a bit more helpful. Do you mean to say if there are five instances of a stock, then you want the total percentage of that stock changes in column B relative to what it was at that point in time? – cmprogram Nov 16 '18 at 14:50

1 Answers1

0

Looking at the description of what you want to do and the actual table I am inclined to think that you have misexplained your requirements and would like to do something else. But based strictly on what you have described, it's quite simple to do using SUMPRODUCT function:

enter image description here

 =SUMPRODUCT(
 (Table3[Stock]=[Stock name])*
 (Table3[Date]>=DATE([Year],1,1))*
 (Table3[Date]<=DATE([Year],12,31))*
 Table3[Return])
Michal Rosa
  • 2,459
  • 2
  • 15
  • 28