copy/paste macro

M

Micki

I am trying to create a macro that will copy a range of data; however, the
number of rows to copy will vary each time the macro is run. Is there a way
that I could creat parameter fields that the macro cuold read?

Thanks,
Micki
 
O

Otto Moehrbach

Micki
You need to come up with some way for the code to determine the range to
copy, and that depends on the nature of your data. For instance, let's say
that Column A has data from row 2 to the last row of your data and your data
is 6 columns wide. The copy command would look like:
Range("A2", Range("A" & Rows.Count).End(xlUp)).Resize(,6).Copy
Come back if you need more. HTH Otto
 
D

Don Guillett

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
 

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