+ Reply to Thread
Results 1 to 2 of 2

speed - variables vs copy paste

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686

    speed - variables vs copy paste

    Which is faster copy & paste special/transpose or defining 35 variables?

    I have a database in excel
    Column A is the ID. Columns B-AJ are criteria relating to the ID in column A

    My procedure finds a specific ID in Column A and copies the data from the adjacent 35 columns (B-AJ) to another form

    The first (5) (B-F) I used variables because their destinations are scattered about the form

    The next (12) I used copy & paste special/transpose because the destination on the form is adjacent rows in one column

    The next (6), next (6) and next (6) I also used copy & paste special/transpose because the destination on the form is adjacent rows in three non adjacent columns

    Other than speed are there pros & cons to copy & paste special/transpose versus variables?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481
    Copy/Paste would allow you to also effect the formatting of the cells.

    Given the small number of variables I would go with the method that makes the code most readable.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

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