Hi, This seems to be a fairly easy problem to solve, but for some reason I cannot think of a way to solve it. I have four macro variables, StartDateMonth, StartDateYear, EndDateMonth and EndDateYear that the user enters in. The variable names in my data set are in the form of Rate_01_2010, Rate_02_2010, Rate_03_2010, Rate_4_2010, ...., Rate_12_2012. I'd like to calculate the average of the rates based on the dates that the user enters. Example: %Let StartDateMonth = 6; %Let StartDateYear = 2010; %Let EndDateMonth = 3; %Let EndDateYear = 2012; Basically, I would want the calculation Average = mean(Rate_06_2010, Rate_07_2010, ....., Rate_02_2012, Rate_03_2012); However, I'd like this to be done automatically, based on the inputs. Thank you for the help!
... View more