Hello everybody. I'm looking for a volatile UDF that selects a random entry from every column in a given range so that every selected value is unique. The same numbers can appear in multiple columns, but not more than once in a column. As i stated, the UDF needs to update whenever i refresh the worksheet, wheter or not the input numbers change. The input parameter would be the data range (e.g. If the starting data was A:[1,2,5], B:[6,3,2], C:[4,5,6,7], D:[6], E:[3,7,8] the UDF's input would be A1:E4, so note that the input contains empty cells too) and the output would be an array containing a random solution (e.g. [1,3,7,6,8] or [3,2,4,6,7], with the previous data). The UDF needs to take an optimised path, otherwise it's going to be very slow with large datasets. This is probably the hardest part, which is why i asked for help in this forum. Here is a sample to better understand the problem: samples.xlsm
--to the moderators, I'm aware that i've already asked this on another thread but the answer i got is giving issues so I posted again to state the problem more clearly and hopefull receive new answers. Please don't take this down, thank you--
--to the moderators, I'm aware that i've already asked this on another thread but the answer i got is giving issues so I posted again to state the problem more clearly and hopefull receive new answers. Please don't take this down, thank you--