Results 1 to 4 of 4

Thread: How to create new row after every alternate Row

  1. #1
    Join Date
    Mar 2009
    Posts
    27

    How to create new row after every alternate Row

    I have made a spreadsheet that has near around 900 rows in it. But now i want a new row in between every Row...! inserting each & every seperately will be waste of time. so i want a simple solution to do this.......

    Can anyone help with this....????

  2. #2
    Join Date
    Apr 2008
    Posts
    2,139

    Re: How to create new row after every alternate Row

    Auto Linked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes".

    Code:
    Sub test() 
    
    • Dim rng As Range Dim LastRow As Long Dim I As Long LastRow = Range("B65536").End(xlUp).Row For I = 3 To LastRow Step 2
      • Set rng = Range("B" & I) rng.Insert Shift:=xlToRight
      Next I
    End Sub

  3. #3
    Join Date
    May 2008
    Posts
    4,570

    Re: How to create new row after every alternate Row

    Try this one :

    Code:
    Sub InsertRowAfterEveryRowWithEntryInColA()
    'It declare your variable "Cell"
    Dim Cell As Range
    'Set it's start value - this determines what column is checked
    Set Cell = Range("A2")
    'set a loop endpoint = when it reaches a blank cell
    Do Until Cell = ""
    'Insert a row
    Cell.EntireRow.Insert
    'Go to next row
    Set Cell = Cell.Offset(1, 0)
    'Repeat loop (goes back to the "Do" line
    Loop
    'Finishes when it reaches 1st blank cell in column A
    End Sub

  4. #4
    Join Date
    May 2008
    Posts
    3,316

    Re: How to create new row after every alternate Row

    Code:
    Sub Macro2()
    Dim C As Integer
    
    For C = 1 To 18 * 2 Step 2
        Rows(a & ":" & a).Select
        Selection.Insert Shift:=xlDown
    Next C
    End Sub
    It has to be done with a macro the above is the macro for the same.

Similar Threads

  1. Alternate stylus for HTC flyer
    By gMALI in forum Portable Devices
    Replies: 4
    Last Post: 23-07-2011, 08:01 PM
  2. Alternate for Acer 3830TG
    By TO-Phir in forum Portable Devices
    Replies: 5
    Last Post: 24-06-2011, 07:37 PM
  3. What is the alternate option for orb on linux?
    By Gaelic in forum Operating Systems
    Replies: 5
    Last Post: 23-12-2009, 10:04 PM
  4. Alternate/forwarded domains
    By Viensterrr in forum Networking & Security
    Replies: 3
    Last Post: 09-09-2009, 01:55 PM
  5. Preferred & Alternate DNS?
    By chowweitat@gmail.com in forum Windows Server Help
    Replies: 1
    Last Post: 18-07-2007, 02:31 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
  •  
Page generated in 1,713,889,260.32872 seconds with 17 queries