creating new functions

P

Peter R Knight

hi,
how do I create new functions in Excell? a simple example is I'd like a
MEAN() function that does the same as the AVERAGE() function. I'd like it
available to all work book (i.e. save it with Excell, not a particular
workbook).

many thanks

Pete
 
B

Bob Phillips

Generally, you can create UDFs that can be saved as add-ins or in
Personal.xls workbooks. If the latter, they have to be prefixed with the
workbook when using in another workbook.

But I am confused, if you want a MEAN that foes the same as AVERAGE, isn't
that AVERAGE <vbg>
 
B

Bob Phillips

You function should look like

Public Function FUMSDATE(ref)
FUMSDATE = DateSerial(Left(ref, 4), Mid(ref, 5, 2), Mid(ref, 7, 2)) + _
TimeSerial(Mid(ref, 9, 2), Mid(ref, 11, 2), Right(ref, 2))
End Function
 
Top