A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hello Mike,
What I would do for this exercise so that Indirect can be used is to add a worksheet for a linked copy of the Table Arrays for the formula. For this we will name the worksheet Table Arrays.
Copy the rangeG:\Reports\JANUARY[Monthly Report.xlsx]Summary'!B1:F50 and Paste Special a link into the Table Arrays sheet starting at cell A1. (Think about linking more than 50 rows if the table in the source is likely to grow but not necessarily the entire columns because with links in the entire column might make the workbook too large.)
Name the linked range. I would not use actual month names like "January" or "Jan" because I don’t know if that could cause conflicts. I would use "MthJan"
Repeat for the remaining workbooks but place them across in adjacent columns perhaps with a column in between to make for easier reading. Name the additional tables MthFeb, MthMar etc.
Now the links should update with any change in the source workbooks.
Then your formula would be as follows with the array name for the required month.
=VLOOKUP($BR3,MthMar,5,FALSE)
If the table array required in your formula is to be dynamic based on the current month etc then you could also insert another table on your Table Array sheet like the following and name it "MyTblArry".
| 1 | MthJan |
|---|---|
| 2 | MthFeb |
| 3 | MthMar |
| 4 | MthApr |
| 5 | MthMay |
| 6 | MthJun |
| 7 | MthJul |
| 8 | MthAug |
| 9 | MthSep |
| 10 | MthOct |
| 11 | MthNov |
| 12 | MthDec |
The following formula returns number of current month. (Add any number of months past the current month to return a month in the future. Negative number for previous months)
=MONTH(TODAY())
The following formula would return the name of the required array one month after the current month. In this case MthMar.
=VLOOKUP(MONTH(TODAY())+1,MyTblArry,2,FALSE)
Now using Indirect you can insert that into the following formula in lieu of MthMar
=VLOOKUP($BR3,MthMar,5,FALSE)
=VLOOKUP($BR3,INDIRECT(VLOOKUP(MONTH(TODAY())+1,MyTblArry,2,FALSE)) ,5,FALSE)
Regards, OssieMac