A few thoughts.
You shoud have variant arguments, so it can accept ranges or numbers.
Use Long not Integer, Integer is converetd to Long by the OS, then back again.
VBA has an intere divide operator.
You test for Wk1 < 2, I think it should be Wk2 <1.
Shouldn't you test for YrWk1 being Not > YrWk2.
No need for the final Goto (or any really)
Function YearWeekDiff(YrWk1 As Variant, YrWk2 As Variant)
Dim Yr1 As Long, Wk1 As Long
Dim Yr2 As Long, Wk2 As Long
Application.Volatile True
Yr1 = YrWk1 \ 100
Wk1 = YrWk1 Mod 100
Yr2 = YrWk2 \ 100
Wk2 = YrWk2 Mod 100
If YrWk1 > YrWk2 Then GoTo ErrHandler
If Wk1 < 1 Or Wk1 > 52 Then GoTo ErrHandler
If Wk2 < 1 Or Wk2 > 52 Then GoTo ErrHandler
YearWeekDiff = Yr2 - Yr1 * 52 + (Wk2 - Wk1)
wayout:
Exit Function
ErrHandler:
YearWeekDiff = CVErr(xlErrValue)
End Function
BTW, you can do it in Excel
=(INT(H1/100)-INT(G1/100))*52-(MOD(G1,100)-MOD(H1,100))
Migt be quicker to do the final math in one.