Results 1 to 11 of 11

Improving Macro's efficiency

Threaded View

icare_dou Improving Macro's efficiency 12-27-2023, 09:21 PM
6StringJazzer Re: Improving Macro's... 12-27-2023, 10:20 PM
icare_dou Re: Improving Macro's... 12-27-2023, 11:36 PM
6StringJazzer Re: Improving Macro's... 12-28-2023, 10:06 AM
6StringJazzer Re: Improving Macro's... 12-28-2023, 10:09 AM
TMS Re: Improving Macro's... 12-28-2023, 12:10 PM
TMS Re: Improving Macro's... 12-30-2023, 07:47 PM
icare_dou Re: Improving Macro's... 12-31-2023, 10:48 PM
TMS Re: Improving Macro's... 01-01-2024, 02:23 AM
ByteMarks Re: Improving Macro's... 01-02-2024, 11:05 AM
Lastejp Re: Improving Macro's... 01-02-2024, 11:33 AM
  1. #1
    Registered User
    Join Date
    01-17-2023
    Location
    California
    MS-Off Ver
    2016, 2019, 365
    Posts
    14

    Improving Macro's efficiency

    I have been using a very lengthy macro weekly for the past 3-years. The macro takes about 7 1/2 hours of computer time to run. I am not having success in combining steps within the macro to reduce the time it takes to run this macro. Below is a representative sample of the inefficient and working script in standard font. This is followed by how I thought steps could be combined in bold font. Unfortunately I cannot get the combined step macro to work. Any input on what I am doing wrong would be greatly appreciated. This could be a specific example or generally what I'm doing wrong, or what reference would be the most useful.

        Sheets("Calculations").Select
        Rows("1:9").Select
        Application.CutCopyMode = False
        Selection.ClearContents
        Columns("A:O").Select
        Range("O1").Activate
        Selection.ClearContents
      Sheets("Calculations").Columns("A:O").ClearContents
    ==
    
        Sheets("Working Data").Select
        Columns("A:O").Select
        Range("O1").Activate
        Selection.ClearContents
    
        Sheets("Working Data").Columns("A:O").ClearContents
    ==
    
        Sheets("Data").Select
        Rows("1:1").Select
        Selection.AutoFilter
    
        Sheets("Data").Rows("1:1").AutoFilter
    ==
    
        Columns("A:O").Select
        Range("O1").Activate
        Selection.Copy
    
        Columns("A:O").Copy
    ==
    
        Sheets("Working Data").Select
        Range("A1").Select
        ActiveSheet.Paste
    
        Sheets("Working Data").Range("A1").Paste
    ==
     
        Range("A1:D1").Select
        Application.CutCopyMode = False
    
        Range("A1:D1").CutCopyMode = False
    ==
    
        Sheets("Calculations").Select
        Range("A10").Select
        ActiveSheet.Paste
    
        Sheets("Calculations").Range("A10").Paste
    ==
    
        Sheets("Formulas").Select
        Rows("1:9").Select
        Application.CutCopyMode = False
        Selection.Copy
    
        Sheets("Formulas").Rows("1:9").Copy
    
    ==
    
        Sheets("Calculations").Select
        Range("A1").Select
        ActiveSheet.Paste
    
        Sheets("Calculations").Range("A1").Paste
    ==
    
        Sheets("Bay Area").Select
        Range("F572").Select
        Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
            xlNone, SkipBlanks:=False, Transpose:=False
    
        Sheets("Bay Area").Range("F572").Paste
    ==
    
        Sheets("Calculations").Select
        Application.Goto Reference:="R1C15"
        Columns("A:O").Select
        Range("O1").Activate
        Application.CutCopyMode = False
        Selection.ClearContents
    
       Sheets("Calculations").Range("A1:O1").ClearContents
    ==
    
        Sheets("Formulas").Select
        Rows("1:9").Select
        Application.CutCopyMode = False
        Selection.Copy
    
        Sheets("Formulas").Range("A1:A9").Copy
    ==
    
        Sheets("Calculations").Select
        Range("A1").Select
        ActiveSheet.Paste
        Range("F2:BI2").Select
        Application.CutCopyMode = False
        Selection.Copy
    
        Sheets("Calculations").Range("A1").Paste.Range("F2:BI2").Copy
    ==
     
        Sheets("Calculations").Select
        Application.Goto Reference:="R1C15"
        Columns("A:O").Select
        Range("O1").Activate
        Application.CutCopyMode = False
        Selection.ClearContents
    
        Sheets("Calculations").Columns("A:O").Range("O1").ClearContents
    Thanks in advance.
    Last edited by 6StringJazzer; 12-27-2023 at 09:41 PM. Reason: please use code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Improving Macro Efficiency - taking hours to run
    By greenstar in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2021, 12:44 PM
  2. Request In Improving Macro
    By crifat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-03-2019, 06:59 PM
  3. Improving this macro?
    By terrypin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2018, 08:28 AM
  4. Improving formula/workbook efficiency
    By aquixano in forum Excel General
    Replies: 0
    Last Post: 06-24-2016, 05:53 PM
  5. Need help improving Job efficiency
    By popovgor in forum Excel General
    Replies: 5
    Last Post: 03-07-2014, 01:11 PM
  6. Replies: 2
    Last Post: 01-26-2013, 04:26 AM
  7. improving speed and efficiency
    By wishmaker in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-14-2010, 11:08 AM

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