ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   TWO CUSTOM FUNCTIONS NOT BEING CONNECTED (https://www.excelbanter.com/excel-discussion-misc-queries/174548-two-custom-functions-not-being-connected.html)

FARAZ QURESHI

TWO CUSTOM FUNCTIONS NOT BEING CONNECTED
 
Hi Friends,

I have formulated following two segments of codes as follows, i.e. XFF1 &
XFF2 which work fine separately, however, now that I want a single piece of
code to return a result of XFF1 to be divided by XFF2, a single code doesn't
seem to be working with a division operator " / ". What might be the reason???

Public Function XFF1(XF1, XF2, XF3, XF4, XF5)
XFF1 = Application.Caller.Parent.Evaluate( _
"SUMPRODUCT(--(MOD(COLUMN(" & XF4.Address & _
"),COLUMNS(" & XF3.Address & _
"))=MOD(COLUMN(" & XF1.Address & _
"),COLUMNS(" & XF3.Address & ")))," _
& XF4.Address & ",--(MOD(COLUMN(" & _
XF5.Address & "),COLUMNS(" & _
XF3.Address & "))=MOD(COLUMN(" & _
XF2.Address & "),COLUMNS(" & XF3.Address _
& ")))," & XF5.Address & ")")
End Function

AND

Public Function XFF2(XF1, XF3, XF4, XF5)
XFF2 = Application.Caller.Parent.Evaluate( _
"SUMPRODUCT(--(MOD(COLUMN(" & _
XF4.Address & "),COLUMNS(" & _
XF3.Address & "))=MOD(COLUMN(" & _
XF1.Address & "),COLUMNS(" & XF3.Address _
& ")))*--(" & XF5.Address & "0)," _
& XF4.Address & ")")
End Function

Furthermore, how can I call two different custom function, i.e. how can I
create a new function like XFF3 to call results of XFF1 and XFF2???

All your expertise shall be highly obliged.

Thanx in advance.


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com