ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Macro (https://www.excelbanter.com/excel-programming/349394-print-macro.html)

Rick

Print Macro
 
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.
..

Otto Moehrbach

Print Macro
 
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 . 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
"rick" wrote in message
...
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.
.





All times are GMT +1. The time now is 02:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com