+ Reply to Thread
Results 1 to 5 of 5

Auto insert of rows

  1. #1
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196

    Auto insert of rows

    What I need is a simple macro that looks down one column in a page and if the content of the cell is different from the one above it inserts a row. So say column B reads 1,1,1,1,1,2,2,2,3,3,3 it would insert a row between the 1s and the 2s and the 2s and the 3s. This is so I can group together sdimilar data. I have given a brief sample sheet of what I would like. Could someone please give a rough idea of how I can do this?
    Many thanks,

    Jack
    Attached Files Attached Files

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks for that.

    Can anyone tell me. What would I need to change if I wanted a page break there instead of a row inserted?

    Jack

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    With the data provided you could use excel Subtotal function which has a option to insert page break between groups

    VBA Noob

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Or with code

    Please Login or Register  to view this content.
    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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