Private Sub CommandButton21_Click()
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Dim myRange As Range
Set myRange = Selection
wb = ActiveWorkbook.Name
If Cells(1, "C") = "Avtar" Then
Workbooks.Open "C:\Users\ben.hubery\Desktop\Avtar.xlsx"
Windows(wb).Activate
Selection.Cut 'define the range to copy
Windows("Avtar.xlsx").Activate
Sheets("Sheet1").Select
Workbooks("Avtar").Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
End If
If Cells(1, "C") = "Ben" Then
Workbooks.Open "C:\Users\ben.hubery\Desktop\Ben.xlsx"
Windows(wb).Activate
Selection.Cut 'define the range to copy
Windows("Ben.xlsx").Activate
Sheets("Sheet1").Select
Workbooks("Ben").Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
End If
If Cells(1, "C") = "Farai" Then
Workbooks.Open "C:\Users\ben.hubery\Desktop\Farai.xlsx"
Windows(wb).Activate
Selection.Cut 'define the range to copy
Windows("Farai.xlsx").Activate
Sheets("Sheet1").Select
Workbooks("Farai").Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
End If
If Cells(1, "C") = "Sophie" Then
Workbooks.Open "C:\Users\ben.hubery\Desktop\Sophie.xlsx"
Windows(wb).Activate
Selection.Cut 'define the range to copy
Windows("Sophie.xlsx").Activate
Sheets("Sheet1").Select
Workbooks("Sophie").Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
End If
Workbooks(wb).Activate
End Sub