+ Reply to Thread
Results 1 to 2 of 2

How do I simplify this macro?

  1. #1
    Registered User
    Join Date
    10-16-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel XP
    Posts
    9

    How do I simplify this macro?

    So I'm doing the same thing over and over for each worksheet that I have and its actually not working anymore, However when I just one run one set it works perfectly fine. The macro is supposed to copy any line that has the status Sold to another worksheet. Thanks in advance

    Please Login or Register  to view this content.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: How do I simplify this macro?

    I don't know of a way to make it more efficient, but you can get rid of all the redundant typing by using a variable for the worksheet name, then calling the sub once for each different worksheet.

    Example:

    Please Login or Register  to view this content.
    If you need anything else please ask.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ 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