The real potential for UDFs (User Defined Functions) is to do more powerful / strange calculations than your normal functions can
For example - here is a function that counts the occurances of any character (or characters) within a text string:
Function Howmany(what As String, where As Range)
testStr = where.Text
ctr = 0
nctsf = Len(what)
For i = 1 To Len(testStr)
If Mid(testStr, i, nctsf) = what Then
ctr = ctr + 1
Else
End If
Next i
Howmany = ctr
End Function
The only reason I asked about your particular function is that, because you ask for the variables (ie new and old nos.), it's pretty much as quick to physically write the formula in excel as it is to enter the function
A Sub CAN change pretty much anything in excel (to answer the 1st question, the syntax for putting a value in a cell can vary but goes along the lines of
Range("A1"

.value = 22 (as Dreamboat said) or cells(1,1).value = 22 or [A1]=22)
A function can incorporate a lot of the same VBA that a sub can but it cannot alter the environment around it (when used in a cell) - only the cell it is in. You can however, also use the Functions within subs - esp useful if you have a calc that needs to be repeated often
In terms of utility functions for all your worksheets - absolutely possible - I have a set of subs and functions that I do that with - you need to save them in "PERSONAL.xls"
To create a "Personal.xls", create a new workbook and save it in your XLSTART directory as "Personal.xls"
This will open up as a "veryhidden" workbook whenever you open excel. Any code or functions that are saved on m,odules attached to that workbook will be available to any of your worksheets (but not other users if they have to use your worksheets)
Hope all this is of some help Rgds
~Geoff~