Randomly Select 50% of Excel Values Without Duplicates
Question details
Select half of a changing list of Excel values at random without selecting the same list entry twice.

- Product
- Microsoft Excel 2016
- Device & OS
- not provided
- Scenario
- A ticket list grows over time, and the user wants a random half of the entries with an option to keep the results fixed.
- Observed behavior
- Random formulas recalculate when the workbook changes, and fixed formula ranges may not include newly added tickets.
Put one ticket per row with no blank cells in the list. If the selected values themselves must be unique, remove duplicate ticket values first using Data > Remove Duplicates.
Use an Excel table and formulas to select half the tickets
Use this method when the source list grows and you want the helper formulas to expand with it.
The formulas below assume tickets start in A2, with Ticket, Random, and Rank as headers in A1:C1. Each source row receives a unique rank, even if two random numbers happen to match.
The selection contains half the entries, rounded up for an odd number of tickets. Change ROUNDUP to ROUNDDOWN in the result formula if you prefer to round down.
Select columns A through C including the headers and ticket rows, then choose Insert > Table and check My table has headers. On the Table Design tab, name the table Table1.
In B2, enter =RAND(). Excel should fill the Random table column and extend the formula to new table rows.
In C2, enter =RANK.EQ([@Random],Table1[Random],1)+COUNTIF($B$2:B2,[@Random])-1. The COUNTIF part breaks ties so each row has a different rank.
In E2, enter =IF(ROWS($E$2:E2)<=ROUNDUP(COUNTA(Table1[Ticket])/2,0),INDEX(Table1[Ticket],MATCH(ROWS($E$2:E2),Table1[Rank],0)),""). Copy the formula down far enough to hold half of your largest expected list.
Select the results in column E and copy them. In another column, use Paste Special > Values to save the current selection without its formulas.

Select a random half of a list in WPS Spreadsheets
Use random numbers, ranks, and lookup formulas in WPS Spreadsheets to select half your ticket rows, then paste the results as values to keep them fixed.
- 1. Enter the ticket list: Open WPS Spreadsheets and enter unique tickets without blank rows in A2:A1000. Add the headers Ticket, Random, and Rank in A1:C1.
- 2. Create random numbers and ranks: Enter =RAND() in B2 and =RANK(B2,$B$2:$B$1000,1)+COUNTIF($B$2:B2,B2)-1 in C2. Copy both formulas down only through the last ticket row.
- 3. Return half the tickets: In E2, enter =IF(ROWS($E$2:E2)<=ROUNDUP(COUNTA($A$2:$A$1000)/2,0),INDEX($A$2:$A$1000,MATCH(ROWS($E$2:E2),$C$2:$C$1000,0)),""). Copy it down far enough for the expected selection.
- 4. Save the current results: Copy the selected results in column E, then use Paste Special > Values in another column. When adding tickets, extend the formulas in columns B and C to the new rows.

Frequently Asked Questions
Will the selection change when I edit the workbook?
It can. RAND recalculates when Excel recalculates the workbook. To preserve a selection, copy the results and use Paste Special > Values in another column.
How can the formulas include new tickets automatically?
Convert the source range to a table with Insert > Table and use the structured references shown above. The helper columns can expand with the table, but copy the output formula farther down if the selection needs more rows.
Why does Excel flag a table formula as inconsistent?
Excel may detect a formula that differs from other formulas in the same table column. Select the flagged cell and check its formula against the other rows; use the error button to restore the column formula if appropriate.
How can I show blank cells instead of zeros below the selection?
The result formula uses IF to return an empty string after the required number of tickets. Copy it down as needed, and cells beyond the selection will appear blank.
Does this method remove duplicate ticket values?
No. It selects each source row at most once, but identical values in different rows can both be selected. To prevent that, select the ticket column and use Data > Remove Duplicates before creating the selection.




