Results 1 to 3 of 3

Looking for an efficient way to paste 100's of VBA formulas into a spread sheet.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-22-2020
    Location
    Sydney Australia
    MS-Off Ver
    365
    Posts
    202

    Looking for an efficient way to paste 100's of VBA formulas into a spread sheet.

    Hi All,

    I have a workbook, with many sheets and many many tables.

    Because I have to insert formulas into the top rows of the tables, absolute and relative referencing goes out the door.

    So I have ended up programing hundreds of cells via VBA to look something like this.

    Sub Test()
    Application.Calculation = xlManual
    Sheets("Sheet1").Select
    Range("A4").Select
    With Selection
        .Formula = "= A1 * A2"
        .HorizontalAlignment = xlLeft
        .etc
        .etc
        .etc
    End With
    
    Range("B4").select
    With selection
       .Formula
       .HorizontalAlignment
       .etc
       .etc
       .etc
    End With
    Application.Calculation = xlAutomatic
    End Sub
    With some great help from Ali, I have now also introduced PQ into refreshing dependent tables. However, the refreshing has to happen very frequently. Which all leads to the system ssssslllllloooooooooooowwwwwwing down.

    Any ideas on how to program better, or just be able to speed this up would be most appreciated. Or do I just have to bide my time and wait for the circular curser to stop spinning ?

    Thanks for your help in advance.
    Last edited by JeffGrant; 02-22-2021 at 06:30 AM. Reason: Administration request

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