run macro each sheet after and then copy range

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

Need to put the following together...


Select each sheet after "Data Sheet".
Run Macro1 on each sheet (this inputs a formula on each sheet).

Copy data range below from each sheet to "data sheet" starting at A10.

Range("A10:G10").Select
Range(Selection, Selection.End(xlDown)).Select
 
Need to establish some stuff first. Makes a difference as to how to attack
the problem.

Select each sheet after "Data Sheet". Are there other sheets before Data
Sheet that will be omitted or is Data Sheet the first sheet and all remaining
sheets to be selected? If it is the latter then no problem because Data Sheet
is the only one to omitt but if it is the former then it would be better to
post the names of all the sheets to be omitted otherwise if someone
rearranges the sheets then the code is going to fail.

starting at A10 on Data Sheet. Is there any existing data in the range from
A10 down or will there be at a later time if the code is re-run? (Need to
know whether to delete or overwrite any existing data first.)

Is there anything in A9? (If A9 is never empty and cells below are empty
then makes it easy to append data down from that point but needs to be
handled differently if A9 is empty.)
 

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

Back
Top