+ Reply to Thread
Results 1 to 4 of 4

Copy formulas down on all active worksheets to last row of data

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    Kent
    MS-Off Ver
    Excel 2007
    Posts
    10

    Thumbs up Copy formulas down on all active worksheets to last row of data

    Hi,

    Hoping you can help

    I have a workbook that contains many worksheets.

    I have formulas in C2 D2 H2 J2 K2 of each worksheet

    There are a different number of rows in each worksheet that the formula needs to be applied to.

    Is there a macro that can apply the formulas to each worksheet but only down to last row of data within each sheet?

    I have the following which works fine if there is only one worksheet. But is there a way of making this run on all active worksheets?



    Sub ApplyFormulasDown()



    Range("C2:D2").Autofill Destination:=Range("C2:D" & Cells(Rows.Count, "A").End(xlUp).Row)
    Range("J2:K2").Autofill Destination:=Range("J2:K" & Cells(Rows.Count, "A").End(xlUp).Row)
    Range("H2:H2").Autofill Destination:=Range("H2:H" & Cells(Rows.Count, "A").End(xlUp).Row)



    End Sub


    Thanks in advance for any helo you can offer

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy formulas down on all active worksheets to last row of data

    Try this.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-08-2010
    Location
    Kent
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Copy formulas down on all active worksheets to last row of data

    Thanks, however in the workbook I am workinmg with this has only applied the formula to the first two rows of data on each worksheet (rows 2-3). I can't understand why as the above suggestion looks fine. I have used the suggested code elswhere and it has worked fine. Am very confused!

    Dim ws As Long

    For ws = 1 To Worksheets.Count

    Next ws

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy formulas down on all active worksheets to last row of data

    At this point I really have no idea what you really need help with. It was my understand from your first post,
    Is there a macro that can apply the formulas to each worksheet but only down to last row of data within each sheet?

    I have the following which works fine if there is only one worksheet. But is there a way of making this run on all active worksheets?
    that your code worked fine you just needed it to run on all active worksheets. I am going to take a complete shot in the dark guess that maybe this is what you are looking to acomplish:

    Please Login or Register  to view this content.
    If this is not what you are looking for then you need to CLEARLY and CONCISELY state what you goal is and how the data is being stored in your sheet. Best of luck.

+ 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