+ Reply to Thread
Results 1 to 4 of 4

combine and clean two macros

  1. #1
    Registered User
    Join Date
    03-07-2006
    Location
    Columbus, Ohio
    Posts
    5

    combine and clean two macros

    Hi, I have two macros that do a lot of the same things but both are slowing down excel, I have looked for quick and easy ways to combine and clean them but as a true beginner in VBA, I can't find the solution. If I post both here, can someone take a look at them and, hopefully, combine and clean it up. I am a true beginner and recorded the old fashioned way, then went into the vba and tried to clean both up individually so, they may not look pretty. Any help is always appreciated, thanks. OrgData.txtIRMS.txt
    I pasted them into notepad and attached them as txt files.Sample.xlsm
    Last edited by deekar; 03-11-2014 at 10:10 AM. Reason: Added example excel file

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: combine and clean two macros

    Suggest you post a sample workbook with some typical data and the code in situ.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-07-2006
    Location
    Columbus, Ohio
    Posts
    5

    Re: combine and clean two macros

    I revised my original message to include a sample excel file.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: combine and clean two macros

    Well, this is a start:

    Please Login or Register  to view this content.

    Avoid selecting cells, rows, columns ... you don't need to. Combine things where they are being treated in the same way.

    In the other macro, lose all the scrolling. Avoid ".Select ... Selection." Combine as above.

    Not entirely sure how you want to combine the macros. Both doing lots of sorting?

    Regards, TMS

+ 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. [SOLVED] Cannot combine IF,AND, INDEX functions to produce a clean result
    By Excel Learner2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-01-2014, 08:05 AM
  2. Macro to combine and clean multiple files
    By micahjb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2013, 07:16 PM
  3. Clean way to combine macro buttons (combo list?)
    By koodicoderi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-03-2013, 06:06 AM
  4. Clean Up Macros to save file size
    By Danielle123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2009, 10:15 AM
  5. Clean up and Fix Two Macros
    By scottnshelly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2006, 08:15 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