Al Chara
MrExcel MVP
- Joined
- Feb 21, 2002
- Messages
- 1,701
Hi all,
I have a sheet with two columns. Column A has part numbers organized by department and Column B has the cost per part number. I have a macro that sets the print area depending on the department.
I would like to have a way to print the total cost of all the part numbers in a department. The parts list is automatically generated so I cannot add any cells inside the list that will sum the cost per department. But I want a way to display the total cost for a department when I print each department's parts list. I was thinking that I have two options:
1. put a formula in the header (if this is possible)
2. put a formula at the top of the document in the first row and have that be the Print Title (so it prints on each page).
I would need the formula be able to generate the proper SUM for each department. Basically I need to enter a formula in a cell or header that will sum a range of cells. The problem that I run into is that my range is stored as a variable and I cannot use the variable in a formula in the worksheet.
Can anyone give me any help or suggestions on solving my problem.
Kind regards,
Al
I have a sheet with two columns. Column A has part numbers organized by department and Column B has the cost per part number. I have a macro that sets the print area depending on the department.
I would like to have a way to print the total cost of all the part numbers in a department. The parts list is automatically generated so I cannot add any cells inside the list that will sum the cost per department. But I want a way to display the total cost for a department when I print each department's parts list. I was thinking that I have two options:
1. put a formula in the header (if this is possible)
2. put a formula at the top of the document in the first row and have that be the Print Title (so it prints on each page).
I would need the formula be able to generate the proper SUM for each department. Basically I need to enter a formula in a cell or header that will sum a range of cells. The problem that I run into is that my range is stored as a variable and I cannot use the variable in a formula in the worksheet.
Can anyone give me any help or suggestions on solving my problem.
Kind regards,
Al