Precede the macro name with Personal.xls!
--
HTH
Bob Phillips
wrote in message
oups.com...
Hi there folks.
I am trying to add a formula to my personal.xls file for use in all
workbooks.
Here it is:-
' Interpolate values
Function ITP(tgtwt, lwt1, Lwt2, yield1, Yield2)
diffa = (Lwt2 - lwt1)
diffb = (tgtwt - lwt1)
facta = diffb / diffa
diffc = Yield2 - yield1
factb = diffc * facta
ITP = yield1 + factb
End Function
Nice and simple.
It works a treat within the personal.xls file but when I open a fresh
workbook it doesn't! I get a #NAME error.
If I then unhide personal.xls and try it in the personal file it's
fine.
It's really confusing me and any help would really be appreciated!
It's Excel 2003 running on Windows XP (SP2)
Thanks very much,
Wullie
|