This subject was last covered in March 2014. I have now updated the Python code to work with xlwings, and the new version (including open source VBA and Python code) can be downloaded from:
Sortfunc.zip.
The previous version, linking to Python through Pyxll is still available from:
SortFunc-pyxll.zip.zip.
The Python functions require xlwings and Python. The Anaconda Python package includes xlwings as well as the Numpy and Scipy libraries.
The screenshot below shows examples of the VBA and Python dynamic sort functions. See the previous post for more details.
Pingback: Sorting with Python and Numpy | Newton Excel Bach, not (just) an Excel Blog