Wait, on which workbook are you running your code?
You should only do it in your actual workbook. Not the sample I provided. As there were many broken links etc. I had cleaned those up.
Then you'll need to add named range to your workbook using the formula provided.
Then go into advanced editor and copy M codes there. Then paste it into blank query in your workbook.
Bookmarks