How do I simplify a macro in excel?
Norman,
I tried your suggestion using a Call command and it seemed to work. I was
not familiar with the command. Thank you for the advice. :)
--
Erik
"Norman Jones" wrote:
Hi Erik,
Try something like:
Dim SH as Worksheet
For Each SH in ActiveWorkbook.Worksheets
' Your common sheet processing code here
'Or, call another macro which holds the common code:
Call MyMacro
Next SH
---
Regards,
Norman
"Erik" wrote in message
...
I have a very lenghty macro that I created in excel to distribute a large
list of data to other sheets in the workbook based upon assignments
denoted
on the sheet containing the data listing. As such, my macro simply
repeats
the same commands for each of the "other sheets" that the data is being
distributed to. Is there a way to simplfy macros like this in excel?
(i.e.
refer to a separate macro containing the repeated commands or refer to
specific lines in the macro rather than redundency)
--
Erik
|