excel formula to lookup year and sum

  • Hi


    I need an excel formulae that can do the following in the attached excel sheet


    1 . Look up the year from output sheet starting from cell A4 . Look up this value in the sheet investment returns

    2. Take the sum of values from year looked up in step 1 till year 2019. The values from column D( Cumulative return to end of 2019) in the investment return sheet should be summed.


    As an example in the output sheet I have manually done the calculation for year 2017 . But I need an excel formula that can do the same thing so that i can drag it for other years.