title: How do I use a list on one tab in Excel to create new columns in another tab?
body: <p>I would need some help with creating a customizable table in MS Excel. </p>
  
  <p>I am trying to put together a MS Excel spreadsheet for work to track certain metrics in our day to day operation. I would like the file to be rather flexible in the combination of metrics that it will allow to be tracked when finished.</p>
  
  <p>I have one tab in the spreadsheet that contains the various metrics that I would like to track information for, and I would like to be able to simply go into that tab, mark the relevant entries by entering an "x" in the cell next to them, and have a column added in the main tab of the file for every entry marked this way. Any values for these entries will entered manually in the main tab, in the rows for the appropriate sub sets, which are permanent cell values in the main tab. I would just like to be able to create a custom table in one tab, with appropriate columns based on the desired/marked data in the second tab. I know that this will require programming some macros, but I don't know how to create a macro that will allow me to click a button in the spreadsheet and then have the spreadsheet automatically add columns for each value selected in the secondary tab.</p>
  
  <p>How can I program a macro, that enables a button to be pressed in the spreadsheet, which will then look up any cells marked with an "x" next to them and create a new column in tab1 using the value of each cell in tab2 as the header in the table in tab1? I can't find any information online on what coding commands would perform that task and since there is no way in Excel to complete this other than looking up the header info and writing it into the relevant cells myself, I can't find any associations to help me figure this out myself either.</p>