Results 1 to 5 of 5

automated copy in table

Threaded View

  1. #1
    Registered User
    Join Date
    12-12-2006
    Posts
    63

    automated copy in table

    Hello, I have a macro where at one point I need to copy the same value in one column of a table. This is to be used on a number of tables but they will vary in how many rows they have.

    I'm using the code;

     Range("C5").Select
       Selection.Copy
       Range(Selection, Selection.End(xlDown)).Select
       ActiveSheet.Paste

    This works fine for all tables except ones that only have one row ie. in some cases the value in C5 does not need to be copied down as there are no more rows in the table. At the moment the macro will copy the value in C5 to all the cells in column C to the bottom of the Worksheet.

    is there any way to avoid this?

    many thanks
    Liam
    Last edited by VBA Noob; 08-06-2008 at 12:05 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1