Results 1 to 6 of 6

Insert Row on Multiple Sheets - Copy Formulas

Threaded View

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    West Chester, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    5

    Insert Row on Multiple Sheets - Copy Formulas

    Hi all,

    I'm new to the forum and have searched and found similar problems, but no solution meets my specific need. I have 3 sheets in a workbook which all follow an identical format (customer name in column A, and months in columns to the right (currently B through P - but this will increase with time). All of the names across the 3 sheets are in an identical order, but whenever I need to add a customer (which would be accomplished through inserting a row), I would like the other two sheets to update with the same customer name and copy the formulas in column B and right down one row to the newly inserted row. One caveat, the formula that the macro would copy is one that I created (it is not standard in excel - the formula adds only BOLD numbers)...

    My sheet names are "Done & In CORD" "Done Not Received" and "Opportunity"

    Here was my first crack at it...

    Sub Insert_Rows()
        
        Dim sh As Worksheet
        
       
        For Each sh In Sheets
            If sh.Name = "Done & In CORD" Or _
                sh.Name = "Done Not Received" Or _
                sh.Name = "Opportunity" Then
                With sh
                    .Cells(ActiveCell.Row, 4).EntireRow.Insert
                    .Range(.Cells(ActiveCell.Row, 1), .Cells(ActiveCell.Row, 4)).FillDown
                End With
            End If
        Next sh
    
    End Sub
    Thanks for the help!
    -Matt
    Last edited by Cutter; 10-20-2012 at 05:24 PM. Reason: Added code tags

Thread Information

Users Browsing this Thread

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

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