Print Macro

G

Guest

II have one profit and loss statement template in excel that is populating
information from an excel data worksheet using vlookup formulas. Is there a
way to create a macro that will select each dept number print the income
statement and go to the next dept number and print the income statement for
that department?

Basically I have a list of twenty department numbers and each department
number is unique. The macro should select each department number to populate
the profit and loss template, print that information and go to the number
department.
..
 
O

Otto Moehrbach

Rick
Yes, a macro can do that easily, but without knowing the layout of your
data it's hard to write the code.
You say that the template sheet populates itself with VLookup formulas.
What do you change in the formulas to bring in data about another
department? You could use a cell address in the VLookup formulas (instead
of that parameter) and that cell would contain that parameter that you
change. A macro can easily loop through a list of all of that parameter and
print what you want printed.
If you wish, send me your file or a sample of your file and I'll work up
the code. Make up data if you feel your real data is proprietary. I need
just the layout. My email address is (e-mail address removed). Remove the
"nop" from this address.
Another way is to remove all the VLookup formulas and simply write the
macro to populate the template, print, and move on to the next department.
HTH Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top