Function Problems

Randomly Select 50% of Excel Values Without Duplicates

Jason MillerJason Miller Nov 14, 2026 870 views

Question details

Select half of a changing list of Excel values at random without selecting the same list entry twice.

Randomly Select 50% of Excel Values Without Duplicates
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.
Before you start

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.

Solution 1Recommended

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.

1
Create a table

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.

2
Generate random numbers

In B2, enter =RAND(). Excel should fill the Random table column and extend the formula to new table rows.

3
Rank each ticket

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.

4
Return the selection

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.

5
Keep a selection fixed

Select the results in column E and copy them. In another column, use Paste Special > Values to save the current selection without its formulas.

Use an Excel table and formulas to select half the tickets
Results recalculate: RAND can generate new numbers when the workbook recalculates. The table expands for new tickets, but you must also copy the result formula farther down column E if more output rows are needed.
Random selection in WPS

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. 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. 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. 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. 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.
Select ticket rows without repeating a source rowOpen and save Microsoft Excel XLSX filesUse familiar spreadsheet formulas and a straightforward interfaceFreeze a selection with Paste Special > Values
microsoft office alternative - wps office

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.