Hi there @aatalai
If you change your rnd statement from RandInt() to Rand(), you'll remove the need to pass in the number of items. This will allow you to have a single macro as opposed to a nested one, which can be tricky to package.
Another thing is the name of your random variable. Yours is Rand. This is a common name that users can come up with. If the record set passed into your macro has a column named Rand, that column is used by the logic your macro and is removed by the final Select. The net result is that X columns of data go in and X-1 columns come out. A common technique to create less common names while still demonstrating its purpose is to add leading and/or trailing characters to the column name, i.e. xxxRandxxx, or _Rand_
Dan
@danilang thanks for the suggestion updated to not be a nested macro