View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
slim[_2_] slim[_2_] is offline
external usenet poster
 
Posts: 8
Default Hoping a guru can help this novice out with a simple macro

Hi everyone. I'm new VBA and have very minimal knowledge of most VBA
commands, however, I can understand how simple macros work by reading them.
I'm hoping that someone here can help me out with a macro I'm attempting to
write.

The macro is for a monthly financial report. The spreadsheet consists of
two worksheets. The first worksheet is the report, and second is a list
numbers (departments). What I would like the macro to do is:

1. Take the first cell of the list of department numbers from the second
sheet (ie. contents of cell A1) and copy it into a cell on sheet 1 (ie. cell
B5).

2. Perform a manual calculation (what would happen after pressing the F9
key). This step is actually the easy one that I can figure out.

3. Supress all rows that have a balance of 0. For example, if all dollar
amounts on a row add up to 0, this row would be hidden.

4. Save the file with the filename of the department number.

5. Unsupress rows from step #3.

6. Repeat this entrie process for all departments, so it would go back to
sheet #2, and advance to the second number on the list...and continue until
it gets to the end of the list.


I would be very greatful if someone could shed some light on this task.
Even if someone could tell me the basic methods for these steps, I could
work with that and research those methods.

Thanks in advance for any help.