Results 1 to 13 of 13

Adding a new row with vba that combines formatting

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    230

    Adding a new row with vba that combines formatting

    Hello,

    I am trying to use VBA to insert a new row. I have conditional formatting for a group of my cells (M19:FL30), and I want the new line to be inserted within this group of cells. Currently, I have this, which works fine:

    Sub new_line()
        Rows("8:8").Select
        Selection.Copy
        Rows("27:27").Select
        Selection.Insert Shift:=xlDown
        Application.CutCopyMode = False
    End Sub
    As you can see, I have copied row 8 and pasted it into row 27. However, row 8 has different conditional formatting than my group of cells (M19:FL30). Is there a way to combine the two so that my inserted row has the coniditional formatting of both row 8 and the group of cells (M19:FL30)?
    Last edited by Cutter; 07-24-2012 at 12:51 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