Download the Excel file with the VBA code of the functions
SORT, SORTBY, FILTER, XLOOKUP, XMATCH, UNIQUE, SEQUENCE, RANDARRAY
and all examples shown on these web pages:
▸Download Excel file
(Version 3.8 - Last update: 2024-10-24 - XLookup and XMatch now fit for use in array formulas ▸more on this)
More information on the ▸Sort page.
After performing the procedure described here, these functions are available for the one Excel file in which they were integrated. If they are to be automatically available for all Excel files on your own computer, you can install them in Excel as an Add-in (see ▸next section).
This is the simplest case. In the downloaded Excel file (download see above) you delete all worksheets except for one empty worksheet. - Done.
This empty file then only contains the VBA code of the functions. It can thus be used as a template for all new Excel files to be created.
In this case you have to copy the module with the VBA code of the functions into your own file and save the file as a .xlsm Excel file.
To do this, follow these steps:
So that you don't have to carry out these three steps for each individual Excel file, you can also set up the functions as an Add-in. Then you can access these functions in all Excel files on your own computer without having to copy the VBA modules.
However, if you want to share an Excel file that uses one of these functions, you have to copy and deliver the module modul_hbsort.
If the functions are set up as an Add-in in Excel, they are automatically available to all Excel files on your own computer, even if the Excel files have the extension .xlsx.
Disadvantage:
Excel files that were created with the add-in activated and that contain the new functions only run on your own computer. They cannot therefore be passed on to others without further ado. If you often want to transfer Excel files to other computers, it is easier not to set up the new functions as an add-in, but to integrate the VBA code of the new functions into each Excel file as described under points 1 and 2.
For setting up the UDFs (user defined functions) as an Add-in, follow these steps (Excel 2019):
From now on the functions Sort_, Sortby, Sortby2, Filter_, Unique, Sequence, Randarray, XLookup, XLookup2 and XMatch can be used in every Excel file on your own computer.