Results 1 to 12 of 12

Thread: Copy cell range onto new tabs sorted in groups

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Thanks Paul- that's pretty much it.

    However column H value may differ and wouldn't always be 1,2,3 etc. Would be a string value 'Class 1 11/12' for Group 1 for example. Could that easily be changed?

    Tried adding another (paltry) variable for each Class group but it's not liking it. Getting a blank sheet created. Ran a test and getting '0' for SetGrp?

            numInGroup = 1
            SetGrp = "Class" & numInGroup & " 11/12"
    And

            'loop all input rows numGroup times pulling each group individually
            For rowIn = rowHeader To rowLast
                If r1.Cells(rowIn, 8).Value = SetGrp Then
                    r1.Rows(rowIn).Copy ws2.Cells(rowOut, 1)
                    ws2.Cells(rowOut, 1).Value = SetGrp
                    numInGroup = numInGroup + 1
                    rowOut = rowOut + 1
                End If
            
            Next rowIn
    Last edited by branston; 01-20-2019 at 07:01 AM.

Posting Permissions

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