How to choose a random cell in an excel sheet



Hi there.

I am experimenting with excel and Uipath. I am sending several emails, but I want it to randomly select a new subject line in every email. How do I manage this?. I have 9 different subject lines, but I can’t get it to randomize/choose a new one very time :-/.

Best regards,




You can keep your 9 subjects in a dictionary with integers as keys and subject lines as values. And then use a random variable (new Random.Next(1,9)) to fetch the random subject value.

PFA the workflow for reference.randomSubject.xaml (8.1 KB)



@Prakshi_Tyagi"[dept] = ‘account’ ").CopyToDataTable()

In above statement how can i give array variable which contains different values in place of “account”.


Awesome. Thanks. I will try :slight_smile: