Results 1 to 4 of 4

Insert row if the value of a column changes

Threaded View

dualaudio454252 Insert row if the value of a... 04-19-2014, 02:34 PM
Mumps1 Re: Insert row if the value... 04-19-2014, 02:55 PM
dualaudio454252 Re: Insert row if the value... 04-19-2014, 03:25 PM
Mumps1 Re: Insert row if the value... 04-20-2014, 08:30 AM
  1. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Insert row if the value of a column changes

    Try:
    Sub InsertRows()
        Application.ScreenUpdating = False
        Dim LastRow As Long
        LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
        Dim x As Long
        On Error Resume Next
        For x = LastRow To 1 Step -1
            If Cells(x, "F") <> Cells(x - 1, "F") Then
                Rows(x).EntireRow.Insert
            End If
        Next x
        Rows(1).EntireRow.Delete
        Application.ScreenUpdating = True
    End Sub
    Last edited by Mumps1; 04-19-2014 at 02:57 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find most recent date in Column Headings in a Range, insert new column and heading
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2014, 08:28 AM
  2. [SOLVED] Insert Row & Insert Column Macros
    By amfrancis in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-19-2014, 01:07 PM
  3. Insert column and fill column upto where data is in previous column
    By aka189 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-24-2012, 06:07 AM
  4. Replies: 1
    Last Post: 08-24-2012, 03:18 PM
  5. Insert Column then insert designated number
    By houseguy007 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-18-2010, 08:15 PM

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