Select each range in your table, excluding the header and name it using the value in the header.
Make sure you have any blanks in your table as ="" (If you don't do this, you will end up with zeros in your result cells)
In Columns A2:C, select the max amount of rows you would need and enter the following formula:
=INDIRECT(A1) and hit CTRL-SHIFT-ENTER rathern than just Enter.
Select Columns A:C and make a new Conditional Formatting Formula of =ISNA(A1) and format the font to white to hide all #N/A that will result from where there is no data in that spot.