By: Zahid Hasan

In reply to Uday Kumar.

Dear UDAY KUMAR,

Good afternoon! Thank you for reaching out to us. In the following section, I’ve suggested a method for handling your issue.
First, apply this formula in cell M2.

=LAMBDA(item_name,max_issue,XLOOKUP(SEQUENCE(SUM(max_issue)),VSTACK(1,SCAN(1,max_issue,LAMBDA(a,b,a+b))),VSTACK(item_name,""),,-1))(H2:H5,I2:I5)
Formula Breakdown
In this formula, item_name refers to the cell range H2:H5 of your provided worksheet, and max_issue represents the cell range I2:I5 of that worksheet.
XLOOKUP(SEQUENCE(SUM(max_issue)),VSTACK(1,SCAN(1,max_issue,LAMBDA(a,b,a+b))),VSTACK(item_name,””),,-1)) → This part of the formula will generate the Item Names according to their maximum issue number.
(H2:H5,I2:I5) → This part is required for specifying the cell ranges for item_name, and max_issue parameters of the formula.
After applying this formula, you will get an output like this in your worksheet.
Now, select these cells and copy them. Later, paste them as values in the same location.

Now, apply the following formula in adjacent cell N2 and drag the Fill Handle up to cell N32.
=RAND()

After that, select the data of Column M and Column N. Then, go to the Sort & Filter option from the Home tab and choose the Custom Sort option from the drop-down.

A dialogue box named Sort will appear on your worksheet. In the Sort by field, select Column N. You can keep the other fields unchanged. Finally, click OK.

Lastly, select the entire Column N and delete it.
After following these steps, you will have a randomized list of Item Names for a month as demonstrated in the following image.

I sincerely hope that this resolves the issue that you are facing. If you need any further assistance, please let us know. Have a great day!

Regards
Zahid Hasan
ExcelDemy