UDF Dependent Ranges

MikeMcCollister

Board Regular
Joined
May 6, 2020
Messages
71
Office Version
  1. 365
Platform
  1. Windows
I have some user defined functions (UDFs) that I want to add some range dependencies to. This is so that I don’t have to make them volatile any more and will make calculations faster.

The current UDFs have either one or two arguments as shown here:

Excel Formula:
=BudgetLineItemTotal(B24)
=NthItemInMonthCredit(A6, B6)

By adding the dependent range, in this case the table named “MainChecking”, should I make the dependent range the first or last argument of the UDFs?

Dependent range as first parameter:

Excel Formula:
=BudgetLineItemTotal(MainChecking, B24)
=NthItemInMonthCredit(MainChecking, A6, B6)

Dependent range as last parameter:

Excel Formula:
=BudgetLineItemTotal(B24, MainChecking)
=NthItemInMonthCredit(A6, B6, MainChecking)

Basically, are there any logical arguments on which one to pick or is this just a big/little endian argument?

Thanks,

Mike
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Not sure it makes any difference. Personally I'd put the range as the 1st argument followed by the criteria, simply because that's how Xl functions tend to be laid out.
 
Upvote 0
Solution
Not sure it makes any difference. Personally I'd put the range as the 1st argument followed by the criteria, simply because that's how Xl functions tend to be laid out.
Fluff,

Thanks. Good argument to put it first.

Mike
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,987
Messages
6,182,168
Members
453,093
Latest member
Soffy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top