I am doing a query against a range in Excel to pull records. I need 5 records selected in random from a pool of 15. I did some research and could find a syntax for random ordering in MySQL and T-SQL. Here is a question from SO that summarizes these examples: Return rows in random order
SELECT * FROM table ORDER BY NEWID()
- from T-SQL
Is there a similar NEWID()
or UUID()
syntax available in Excel VBA, and if not, what is an elegant solution to achieve this?