Using Macros

C

Challenger

I am new to Macros. I have to compile several monthly reports that combine
information from other reports into one or more spreadsheets. There are 7
department reports (originally crystal reports) that I have converted to
Excel. I want to copy and paste data from specific cells in the department
reports to the a separate spreadsheet for each department. One for each of
the 7 departments.

This is a simple copy/paste function. The macro I recorded to copy and
paste specific cell data to the new spreadsheet works well for set of data
where I recorded the macro. But when I try to run it on the report with data
from a different department, it copies the same information and data that was
on the first department report.

I have created a workbook as a template to run the macro and then just
copied different department data into the worksheet, but it still creates the
new spreadsheet with the 1st department data.

What am I doing wrong?
 
S

StumpedAgain

If you post your code, we can better help pin point the problem. It sounds
like you're referencing a specific range on a specific sheet instead of doing
an "ActiveSheet" type of thing or even looping through all of the sheets that
you want to copy/paste data from.
 
C

Challenger

You are probably right since I didn't know the difference in personal.xls,
active sheet, or all workbook options. I no longer have the code as I
removed the module. Anyway I can get it back? If not I'll recreate the
macro and post the code.

Can you explain looping?
 
S

StumpedAgain

If you've already deleted it and didn't save a copy, you'll probably be
better off just recording a new macro. Good luck!
 

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