Posts by itsmattatv

    Need to fill the newly created rows with a color. The VBA below is what I have set to insert a new row between data that I highlight. Need this row filled. Thank you to anyone that can help

    Sub InsertAlternateRows()

    'This code will insert a row after every row in the selection

    'This code has been created by Matta

    Dim rng As Range

    Dim CountRow As Integer

    Dim i As Integer

    Set rng = Selection

    CountRow = rng.EntireRow.Count

    For i = 1 To CountRow

    ActiveCell.Offset(1, 0).EntireRow.Insert

    Range("C" & ActiveCell.Offset(1, 0).Row).Value = Range("C" & ActiveCell.Offset(0, 0).Row).Value

    ActiveCell.Offset(1, 3).Value = ActiveCell.Offset(-2, 3).Value

    ActiveCell.Offset(1, 4).Value = ActiveCell.Offset(-2, 4).Value

    Range("F" & ActiveCell.Offset(1, 0).Row).Value = Range("F" & ActiveCell.Offset(0, 0).Row).Value

    ActiveCell.Offset(1, 10).Value = ActiveCell.Offset(0, 10).Value

    ActiveCell.Offset(1, 11).Value = ActiveCell.Offset(0, 11).Value

    ActiveCell.Offset(1, 12).Value = ActiveCell.Offset(0, 12).Value

    ActiveCell.Offset(1, 13).Value = ActiveCell.Offset(0, 14).Value

    ActiveCell.Offset(1, 19).Value = ActiveCell.Offset(0, 19).Value

    ActiveCell.Offset(1, 20).Value = ActiveCell.Offset(0, 21).Value

    ActiveCell.Offset(1, 22).Value = ActiveCell.Offset(0, 22).Value

    ActiveCell.Offset(1, 23).Value = ActiveCell.Offset(0, 23).Value

    ActiveCell.Offset(2, 0).Select

    Next i

    End Sub