+ Reply to Thread
Results 1 to 4 of 4

VBA Efficiency - Alternative to Select

  1. #1
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    VBA Efficiency - Alternative to Select

    I am trying to learn ways to improve VBA efficiency in Excel. When building a macro using the Excel VBA Macro tool, the code is full of Select/Selection. I have read this is not efficient.
    Any suggestions what i can do with the codes below?

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Crawfy; 12-01-2018 at 04:37 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    6,685

    Re: VBA Efficiency - Alternative to Select

    You will rarely need to activate/select a sheet/range to manipulate it.

    Below is your code but slightly slimmed down:
    Please Login or Register  to view this content.
    Copying and pasting entire columns will cause it to run slower than necessary so it would be better to act on only the used range. The above can easily be adapted to do that.

    Does that help at all?

    BSB

  3. #3
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    Re: VBA Efficiency - Alternative to Select

    Thank you. Much more efficient. However i had to modify as your Paste Values line distorted my formatting for some reason. I will continue to refine it to select a set range within each column only.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    6,685

    Re: VBA Efficiency - Alternative to Select

    Quote Originally Posted by Crawfy View Post
    I will continue to refine it to select a set range within each column only.
    This might help:
    Please Login or Register  to view this content.
    BSB

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Select alternative columns as range
    By Cobelatte in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2016, 08:16 PM
  2. [SOLVED] Select Case Statement Alternative Large Number of Combinations
    By plasma33 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2012, 06:28 AM
  3. Removing .Select to Improve Code Efficiency
    By Mordred in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2010, 01:47 AM
  4. Increase Loop Efficiency/Loop Alternative
    By nsorden in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-19-2009, 09:54 AM
  5. Case Select....The alternative method for long "Select Case"
    By kimyap in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2008, 01:24 AM
  6. alternative to .Select?
    By b1ll in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2008, 05:38 PM
  7. [SOLVED] How to select data series to format? (alternative needed)
    By joeu2004@hotmail.com in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-20-2006, 03:55 PM

Tags for this Thread

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