I had hoped to be able to resolve this problem myself, after being provided with a solution to my earlier problem of deleting rows but I have realised that it is not as straightforward as I thought.

I have a number of worksheets in a workbook which are used to collect various data on students.

Each worksheet begins with the pupil names and details about them - these are copied from a 'master data' worksheet - and the various data is entered into the subsequent columns on each worksheet.

I have a userform to add and delete students from all of the worksheets.

I have code which I have modified from Roy Cox which adds a student at the bottom of the master data list and then sorts the data so that the student is included in the correct class in the correct alphabetical ordered place.

EDITED 11/09 - 16:34 - Whole code copied for clarity.

```
Private Sub cmbAdd_Click()
Dim Sh As Worksheet
Dim l As Long

Application.ScreenUpdating = False

' 1) ADD NEW ROW TO EACH WORKSHEET, COPYING FORMAT AND FORMULAE

For Each Sh In ThisWorkbook.Worksheets
    Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
    Rows(Selection.Row).Insert Shift:=xlDown

    With Cells(Rows.Count, "A").End(xlUp)
        .EntireRow.Copy
            With .Offset(1, 0).EntireRow
                .PasteSpecial xlPasteFormats
                .PasteSpecial xlPasteFormulas
            On Error Resume Next
        .SpecialCells(xlCellTypeConstants).ClearContents
    On Error GoTo 0
            End With
    End With
Next Sh

' 2) COPY NEW CHILD FROM USERFORM TO MASTER DATA WORKSHEET

Dim LR As Long
    LR = Sheets("Data").Range("A" & Rows.Count).End(xlUp).Row

    Set c = Range("A" & LR + 1)

    With Me
    c.Value = .TextBox14.Value
    c.Offset(0, 1).Value = .TextBox1.Value
    c.Offset(0, 2).Value = .TextBox2.Value
    c.Offset(0, 3).Value = .TextBox3.Value
    c.Offset(0, 4).Value = .TextBox4.Value
    c.Offset(0, 5).Value = .TextBox24.Value
    c.Offset(0, 7).Value = .TextBox25.Value
    c.Offset(0, 8).Value = .TextBox26.Value
    c.Offset(0, 9).Value = .TextBox5.Value
    c.Offset(0, 11).Value = .TextBox27.Value
    c.Offset(0, 12).Value = .TextBox28.Value
    c.Offset(0, 13).Value = .TextBox29.Value
    c.Offset(0, 14).Value = .TextBox30.Value
    c.Offset(0, 15).Value = .TextBox31.Value
    c.Offset(0, 16).Value = .TextBox32.Value
    c.Offset(0, 17).Value = .TextBox33.Value
    Call ClearControls
End With

' 3) FILL EMPTY CHARACTERISTICS CELLS ON MASTER DATA WORKSHEET

Dim rCell   As Range
Dim rRng    As Range

For Each rRng In ActiveSheet.[A3].Resize(ActiveSheet.UsedRange.Rows.Count - 2)
    If IsEmpty(rRng) Then GoTo NextRow
    For Each rCell In rRng.Offset(0, 7).Resize(1, 14)
        If IsEmpty(rCell) Then rCell.Value = "N"
    Next rCell
NextRow:
Next rRng

' 4) SORT DATA TO INCLUDE NEW CHILD ON EACH WORKSHEET

 Call ResortData

Application.ScreenUpdating = True

End Sub

```

The ResortData sub is also added, below:

```
Sub ResortData()

Dim Sh As Worksheet
Dim LastRow As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row

Application.ScreenUpdating = False

For Each Sh In ThisWorkbook.Worksheets

Range("A4:BE" & LastRow).Sort Key1:=Range("C4:C" & LastRow), Order1:=xlAscending, Header:=xlNo, _
Key2:=Range("B4:B" & LastRow), Order1:=xlAscending, Header:=xlNo ' CHANGE 'BE' TO LAST COLUMN OF SPREADSHEET

Next

Application.ScreenUpdating = True

End Sub

```

Currently the 'master data' sheet is updated with the new pupil and 3 additional rows (there are 3 other worksheets in my trial workbook so I assume that is why).

How do I ensure that the code adds one new row to each worksheet before completing steps 2 and 3 on the master sheet and then step 4 on each worksheet?

(I need step 4 to be completed on each worksheet separately as the data collected and column headings are different on each worksheet from column V onwards)

Thanks for any advice you can provide.