×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

copying & pasting
2

copying & pasting

copying & pasting

(OP)
I would like to know the vba code to copy the contents of one worksheet to the next available empty cells of another worksheet. These worksheets are all in one workbook.

RE: copying & pasting

Hello,

DO you mean you wish to copy an entire sheet to the next worksheet that is currently empty?

i.e. If you have five sheets, Sheets 1, 2 and 3 all have some data and you wish to copy Sheet 1 to SHeet 4? or do you mean something different?



Hope this helps.

----------------------------------

maybe only a drafter
but the best user at this company!

RE: copying & pasting

(OP)
I have certain cells of one worksheet that I want to paste to certain cells of another worksheet. The one worsheet which I am taking a copy of changes. So when I paste again I want to be able to go to the next empty set of cells.

Thanks

Ken

RE: copying & pasting

You can use Worksheet("target").UsedRange to retrieve the used range on the target sheet (replace "target" with the sheet name). If you then use the offset method to go one row lower, you will be able to paste to the next lower row.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: copying & pasting

I have found the easiest way to do anyhting like this is to record a macro whilst manually performing the operation you require. Then look at the code produced, and edit where necessary.

Usually, the resultant VBA is a bit over-the-top. It will contain a whole load of stuff that is actually not required. But you can remove this manually to get more compact code. Comment it out first, make sure it still works correctly, then delete it.

RE: copying & pasting

That's my preferred method of creating macros, too, tomatge.
Thanks for sharing.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources