Results 1 to 2 of 2

Thread: Inserting a blank row at each change in the cell value

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2007
    Posts
    84

    Inserting a blank row at each change in the cell value

    Hi,
    Is there any easy way to insert a blank row in excel after any change in value of the previous cell? Thanks

  2. #2
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: Inserting a blank row at each change in the cell value

    Not sure why you want to do that. Try this:
    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        Application.EnableEvents = False
        Me.Rows(Target.Row + 1).Insert
        Application.EnableEvents = True
    End Sub
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width