+ Reply to Thread
Results 1 to 1 of 1

insert a row if DESC and SHIFT change ...

  1. #1
    Forum Contributor
    Join Date
    09-25-2004
    Posts
    269

    HELP PLEASE!!!!!!!!!!!!!insert a row if DESC and SHIFT change ...

    Where in this code that I could change if there is multiple DESC and SHIFT it would inserts 3 rows but if only one just insert 1 row.
    Collumn (A) are the DESC (B) are the SHIFT

    Sub row()

    For i = [A65536].End(xlUp).row To 3 Step -1
    If Cells(i, 1) = "" Then GoTo Continue1
    If Cells(i, 1) & Cells(i, 2) <> Cells(i - 1, 1) & Cells(i - 1, 2) Then
    Cells(i, 1).EntireRow.Insert
    End If
    Continue1:
    Next i

    End Sub


    Example
    So far the code does this:

    DESC-------------------------Shift

    (A) ----------------------------(B)
    HUNTER-1 ( LARGE 20X24 ) 1
    Insert row
    HUNTER-1 ( LARGE 20X24 ) 2
    insert row
    HUNTER-2 ( LARGE 20X24 ) 1
    insert row
    HUNTER-2 ( LARGE 20X24 ) 2
    HUNTER-2 ( LARGE 20X24 ) 2
    HUNTER-2 ( LARGE 20X24 ) 2
    HUNTER-2 ( LARGE 20X24 ) 2
    Insert row
    HUNTER-3 ( LARGE 20X24 ) 1
    HUNTER-3 ( LARGE 20X24 ) 1
    Insert row
    HUNTER-3 ( LARGE 20X24 ) 2
    Insert Row
    HUNTER-4 ( LARGE 20X24 ) 2
    HUNTER-4 ( LARGE 20X24 ) 2
    Insert Row
    ROTO-LIFT---------------------1
    Insert Row
    SHELL MOLD ( CHICKOPEE ) 1
    Insert Row
    SINTO---------------------------1
    SINTO---------------------------1
    SINTO---------------------------1
    Insert Row
    SQUEEZER---------------------1


    Now where in the code I could change that it could do this:


    (A) ----------------------------(B)
    HUNTER-1 ( LARGE 20X24 ) 1
    Insert row
    HUNTER-1 ( LARGE 20X24 ) 2
    insert row
    HUNTER-2 ( LARGE 20X24 ) 1
    insert row
    HUNTER-2 ( LARGE 20X24 ) 2
    HUNTER-2 ( LARGE 20X24 ) 2
    HUNTER-2 ( LARGE 20X24 ) 2
    HUNTER-2 ( LARGE 20X24 ) 2
    Insert row
    Insert row
    Insert row
    HUNTER-3 ( LARGE 20X24 ) 1
    HUNTER-3 ( LARGE 20X24 ) 1
    Insert row
    Insert row
    Insert row
    HUNTER-3 ( LARGE 20X24 ) 2
    Insert Row
    HUNTER-4 ( LARGE 20X24 ) 2
    HUNTER-4 ( LARGE 20X24 ) 2
    Insert Row
    Insert row
    Insert row
    ROTO-LIFT---------------------1
    Insert Row
    SHELL MOLD ( CHICKOPEE ) 1
    Insert Row
    SINTO---------------------------1
    SINTO---------------------------1
    SINTO---------------------------1
    Insert Row
    Insert row
    Insert row
    SQUEEZER---------------------1
    Last edited by vane0326; 02-06-2005 at 11:38 AM.

+ 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