Sorry my excel is a bit rusty.
I am trying to do a manual merging with a vlookup on a table that contains several time series. Example
A B C D
1 Date1 V1 Date2 V2
2 Jun-2010 10 Jun-2010 100
3 Jul-2010 15 Aug-2010 120
I want to create a new table with
A B C
1 Date V1 V2
2 Jun-2010 10 100
3 Jul-2010 15 NA
4 Aug-2010 NA 100
So each column refers to the same date cell but to different ranges in the reference table. I need to slide the range by two columns every time i move one column in the output table.
So after creating a column A in the output table containing all the possible dates (months), cell B2 would have
=vlookup($A2, Tab0!A2:B3, 2, 0)
and column C2 would have
=vlookup($A2, Tab0!C2:D3, 2, 0),
and so on.
To do this I am trying to write a vlookup function that takes a sliding range
I tried with R1C1 references, I considered INDEX + MATCH but I always get into some kind of problems.
Jun-2010columnBshould containxxxand columnCshould contain `yyyy' – Mark Stewart Aug 31 '16 at 02:30rowandcolumntoindirectsince it looks like it changes based on formula location – Raystafarian Sep 01 '16 at 19:52indirect(thanks for the edit :-) – Marco Stamazza Sep 02 '16 at 09:46indirect. many thanks. – Marco Stamazza Sep 04 '16 at 00:24