Hi All,
So I have a table with data presented below:

I am trying to get these columns to be mapped to their respective pdf block accounts which are as shown below:

Now the output has to be a format that is similar to the below presentation so I am able to just take upload them all for the system to read:

The other thing I am wondering is how I am able to automatically update the accounts so the earliest year is labeled with a 1 at the end of all of its accounts and the second earliest is labeled 2 and so on and so forth. I really would appreciate any help.
Thanks!