Forum Discussion

RubiconXDS's avatar
RubiconXDS
Copper Contributor
Jul 05, 2023
Solved

help with combined random and lookup

Hi everyone,    Its my first time posting and please let me know if you need any further information I have scouted everywhere but cant seem to find the answer I am looking for anywhere.    Brie...
  • HansVogelaar's avatar
    Jul 05, 2023

    RubiconXDS 

    Let's say the data are on the Master Data sheet in A2:B20.

    Enter the following formula in B2 on the Working File sheet:

     

    =IFERROR(LET(Data, FILTER('Master Data'!$B$2:$B$20, 'Master Data'!$A$2:$A$20=A2), Num, COUNTA(Data), INDEX(Data, RANDBETWEEN(1, Num))), "")

     

    This can be filled down if required. Sample workbook attached.

Resources