DRExcel515
Board Regular
- Joined
- Oct 20, 2017
- Messages
- 56
In column A on sheet Calcs I have a distinct list of ticker symbols. On another tab "SQL Dump" I have a much larger data set with all the same ticker symbols but multiple occurances of the symbols (5yrs of monthly data points for each symbol). The formula I want to build starting on the Calcs tab in C2 needs to look up the most recent data point for the symbol in A2 on the SQL Dump tab as well as the oldest data point for that symbol and divide it by the number of months between the two.
Here is the actual formula if that helps..... (Most recent data point - Oldest data point) / # of Months between the two data points
On the SQL Dump tab the data points are in column D starting in row 2 and the ticker symbols are all in order of month end. The trouble I'm having is finding a way to incorporate a lookup to find me the most recent month end for that specific fund, then the oldest available month end and how many months are inbetween as some of the fund symbols may have a full five years of month end data but some may not and there may be a (null) value on some month ends.
Here is the actual formula if that helps..... (Most recent data point - Oldest data point) / # of Months between the two data points
On the SQL Dump tab the data points are in column D starting in row 2 and the ticker symbols are all in order of month end. The trouble I'm having is finding a way to incorporate a lookup to find me the most recent month end for that specific fund, then the oldest available month end and how many months are inbetween as some of the fund symbols may have a full five years of month end data but some may not and there may be a (null) value on some month ends.