Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Copying and PAsting using MACROS

Hi, wonder if anyone can help with this little conundrum. I want to run
a macro that copies a specific row of data from a specific worksheet
and pastes it into another worksheet. I want to specify which
particular row the date gets pasted onto though, preferably by simply
highighting the destination row and then running the macro. At the
moment I am using a manual cut and paste process but would love to make
my workbook a bit slicker. Assistance appreciated. Thanx Andy Fletcher

  #3   Report Post  
 
Posts: n/a
Default

Don, as requested:

ActiveWindow.SmallScroll Down:=-3
Sheets("Clipboard").Select
Range("A21:H24").Select
Selection.Copy
Sheets("Points List").Select
Range("A9").Select
ActiveSheet.Paste

As you can see I am copying a standard plant configuration from the
worksheet called clipboard. I may want to paste the selection at any
row on the destination worksheet. The column configuration will always
remain the same though.

Cheers,

Andy

  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

Are you ALWAYS copying A21:H24 on the Clipboard sheet?

Can't you do something like this with the destination already selected?
(*warning* untested)

dim x as variant
set x = activecell
Worksheets("Clipboard").range(("A21:H24").Copy(x)


" wrote:

Don, as requested:

ActiveWindow.SmallScroll Down:=-3
Sheets("Clipboard").Select
Range("A21:H24").Select
Selection.Copy
Sheets("Points List").Select
Range("A9").Select
ActiveSheet.Paste

As you can see I am copying a standard plant configuration from the
worksheet called clipboard. I may want to paste the selection at any
row on the destination worksheet. The column configuration will always
remain the same though.

Cheers,

Andy


  #5   Report Post  
 
Posts: n/a
Default

Hi, THx for the prompt response. No there are various cellranges with
different configurations of plant that I want to copy from the
clipboard to rhe points list. I have taken this further now and named
these ranges, so I should be able to reference to the names. With
respect to the formula how do I get that into a macro? Sorry dont know
anything about VB. Thanks again for your interest in assisting me.
Andrew



  #6   Report Post  
Duke Carey
 
Posts: n/a
Default

You use a range name as demonstrated below

dim x as variant
set x = activecell
Worksheets("Clipboard").range(range_name).Copy(x)

If you only had a small number of of ranges that you'll copy, you could
create a separate Subroutine for each one, then add buttons to your toolbar
and assign each subroutine to a different button.


wrote in message
oups.com...
Hi, THx for the prompt response. No there are various cellranges with
different configurations of plant that I want to copy from the
clipboard to rhe points list. I have taken this further now and named
these ranges, so I should be able to reference to the names. With
respect to the formula how do I get that into a macro? Sorry dont know
anything about VB. Thanks again for your interest in assisting me.
Andrew



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying & Pasting from Pivot Table Connie Martin Excel Discussion (Misc queries) 3 March 22nd 05 04:01 PM
Trouble copying and pasting a formula Julie P. Excel Discussion (Misc queries) 6 March 4th 05 04:11 AM
Copying & Pasting Formula Connie Martin Excel Discussion (Misc queries) 2 March 3rd 05 05:11 PM
Trouble copying and pasting a formula Julie P. Excel Worksheet Functions 4 March 3rd 05 03:16 AM
Copying & Pasting arrow help Biff Excel Discussion (Misc queries) 0 December 31st 04 03:18 AM


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"