Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

copy/paste macro

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  Seasons greetings.  
Author Message
Micki

External


Since: Dec 31, 2009
Posts: 1



(Msg. 1) Posted: Thu Dec 31, 2009 10:45 am
Post subject: copy/paste macro
Archived from groups: microsoft>public>excel (more info?)

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

 >> Stay informed about: copy/paste macro 
Back to top
Login to vote
Otto Moehrbach

External


Since: Jan 5, 2009
Posts: 2



(Msg. 2) Posted: Thu Dec 31, 2009 3:24 pm
Post subject: Re: copy/paste macro
Archived from groups: per prev. post (more info?)

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

"Micki" wrote in message

> 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

 >> Stay informed about: copy/paste macro 
Back to top
Login to vote
Don Guillett

External


Since: Oct 18, 2008
Posts: 18



(Msg. 3) Posted: Thu Dec 31, 2009 4:06 pm
Post subject: Re: copy/paste macro
Archived from groups: per prev. post (more info?)

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.
 >> Stay informed about: copy/paste macro 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Macro for 'Paste Special' - Is there a way to set a macro up so that perform a 'paste special' into whatever cell is currently highlited? Thanks in advance.

EXCEL 2003 paste special and go to specil misfunction - Hello to everybody, I noticed that if I use the "paste special - values" function to, say, paste three cells with a formula behind and just one value displaying, your result would be to obtain two blank cells and a cell with a value on it. Th...

Excel 2007 - Paste picture link does not print - I have a 2003 spreadsheet with a pasted picture link on one worksheet showing data from another worksheet. Trying this same setup in excel 2007 - the print preview and print does not print the pasted link picture. I have used the camera tool, paste as....

Excel Macro Problem - I have a database with 98 sheets. One sheet for each bus in our fleet. I need to updated the links for each sheet from xls to xlsm without changing the bus number in the link. I used to be able to create a macro to make a change in a few sheets in....

macro security settings - I would like a way to set macro security thru GPO for Excel 2007 SP1 to allow only macro from the startup folder and not from any other files this is actually a group policy question but as this is rather excel specific I was hoping to find the answer...
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]