Pull in a colum of financial data based on the month
I am creating summary reports that compare one financial period to another.
The Budget, Prior Period and Current year are in tables and there is a column
for each month. To do this I currently have the below if statement where I
am pulling in the months sales from the table. $L$1=the month value (example
1=January).
=IF($L$1=1,'Sales Actual 1 of 2'!C7,IF($L$1=2,'Sales Actual 1 of
2'!D7,IF($L$1=3,'Sales Actual 1 of 2'!E7,IF($L$1=4,'Sales Actual 1 of
2'!F7,IF($L$1=5,'Sales Actual 1 of 2'!G7,IF($L$1=6,'Sales Actual 1 of
2'!H7,"error"))))))
The formula works, but there has to be a better way to achieve the same
result. The formula is to long if you try to write it for all 12 months.
|