My spreadsheet has an Allocated and an Actual column for each month. As the final report is run and the month's change, I want to have my vlookup automatically use the value of the month the report is run for (entered in address 'z1') as the column to pull the data from.
For example:
z1 = 02 (for running the report in Feb)
a3 = ID
b3 = Jan Allocated $
c3 = Jan Act $
d3 = Feb Allocated $
e3 = Feb Act $
a10 =
vlookup('ID123',A:E,2,false)
where the 2 in the vlookup formula actually references the address 'Z1' where the column number is stored (this will eventually be a calculated number based on the month and the offset of where the values start given all other data in the worksheet). This will then change as the value in 'Z1' changes without the need to change all the formulas each month.
I envisioned it to look something like: =vlookup('ID123',A:E,z1,false)
I get a #ref error when I use the above. Thanks