View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tanya Tanya is offline
external usenet poster
 
Posts: 155
Default Macro to populate multiple tabs from a master file

I have a data file with 50 columns, including one named "location". There are
hundreds of locations, with values including '01', '21', '71'. I also have
report tabs which contain a template - the number of report tabs matches the
number of unique values in the location column, so in my example there are
three report tabs. The report tabs are identical to each other, except for
their name. I want to create a macro to help populate the report tabs (the
template contains formulas and calculations), based on the value of the
location column.

What I have been doing is manually inserting "=IF(Data!A2=71,Data!M2)" in
the report tab, to pull data from cell M2 of the master file, if the value of
cell A2 = 71. What I want is to be able to do is to receive the master file,
which will always have the variables in the same columns, and run a macro
which will dump the data into the pre-created report tabs. The number of tabs
may differ from time to time, but that can be manually handled.

Ideas?