Here's a neater version that you can use to apply to a named range on your
worksheet - it's dynamic, so you don't need to keep changing the code to
refer to different rows and columns.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ModSheet As Worksheet
Set ModSheet = ActiveWorkbook.Worksheets("PrefixEntries")
Dim ModRange As Range
Set ModRange = ModSheet.Range("ModRange")
Dim TopLeft, TopRight, BottomLeft, BottomRight As Range
Set TopLeft = ModRange(1, 1)
Set TopRight = ModRange(1, ModRange.Columns.Count)
Set BottomLeft = ModRange(ModRange.Rows.Count, 1)
Set BottomRight = ModRange(ModRange.Rows.Count, ModRange.Columns.Count)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column >= TopLeft.Column Then
If Target.Column <= TopRight.Column Then
If Target.Row >= TopLeft.Row Then
If Target.Row <= BottomLeft.Row Then
Target.Value = "XYZ" & Target.Formula
End If
End If
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub