Forum

User defined Functi...
 
Notifications
Clear all

User defined Functions

2 Posts
2 Users
0 Reactions
87 Views
(@defrost)
Posts: 1
New Member
Topic starter
 

I have a UDF (created by others) Tri_Wave(t, V1, V2, T1, T2) which is coded as such in VBA but is keyed into the spreadsheet cell as: =@Tri_Wave((A16;$H$8;$H$9$H$10;$H$11). The function works correctly but I don't understand why the VBA coding differs from the UDF typed into the cell. Why is there a @ in front of the UDF when typed into the spreadsheet cell?

Thank you in anticipation. Tri_Wave-Function-on-Spreadsheet.PNGTri_Wave-Function.PNG

 
Posted : 21/06/2021 7:49 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi David,

Your answer is here: https://support.microsoft.com/en-us/office/implicit-intersection-operator-ce3be07b-0101-4450-a24e-c1c999be2b34?ui=en-us&rs=en-us&ad=us

=MYUDF() 

=@MYUDF() 

Implicit intersection could occur. User Defined Functions can return arrays. When they do, the original formula would have triggered implicit intersection. 

I suggest changing your function declaration, as it is now returns a Variant type, while it seems to be a decimal number:

Function Tri_Wave(t, V1, V1, T1, T2) as Double

 
Posted : 25/06/2021 11:22 pm
Share: