Classify Customer Orders as Acquisition or Retention in WPS Spreadsheets
Question details
Classify each customer's first order as acquisition and subsequent orders as retention using their email address.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- An order table contains customer email addresses, and the user needs to identify first and repeat orders.
- Observed behavior
- Classification should use email as a stable identifier rather than combining email and IP address, which can change between orders.
Confirm that each order has an email address in column D and that row 2 is the first data row. Sort the entire table by order date from oldest to newest so the first occurrence of each email represents the first order.
Use COUNTIF to classify orders by email
Use this formula to label the first occurrence of each email as acquisition and later occurrences as retention.
Enter a heading such as Classification in an empty column, for example cell E1.
Select E2 and enter =IF(COUNTIF($D$2:D2,D2)=1,"acquisition","retention"). Press Enter.
Drag the fill handle from E2 down through the remaining order rows. The expanding range counts each email from row 2 through the current row.
Review column E: the earliest row for each email should say acquisition, and subsequent rows with the same email should say retention.

Classify first and repeat orders with WPS Spreadsheets
Open your order table in WPS Spreadsheets and use COUNTIF to label each customer's first email occurrence as acquisition and later occurrences as retention.
- 1. Open the order table: Open WPS Spreadsheets and select Open to load your workbook.
- 2. Sort the orders: Select the entire table and use Data > Sort to arrange the order-date column from oldest to newest.
- 3. Enter the classification formula: With emails in column D, select E2 and enter =IF(COUNTIF($D$2:D2,D2)=1,"acquisition","retention").
- 4. Apply it to all orders: Drag the fill handle from E2 down to the last order row, then review the labels in column E.

Frequently Asked Questions
Why should I sort orders by date first?
The formula labels the first email occurrence in the current row order as acquisition. Select the entire table and use Data > Sort to put the oldest orders first.
Does COUNTIF treat uppercase and lowercase emails differently?
No. COUNTIF is not case-sensitive, so addresses that differ only in capitalization are counted together. Extra spaces can still prevent a match.
How can I remove extra spaces from email addresses?
In a helper column, enter =TRIM(D2) in row 2 and fill it down. If the cleaned emails are in column F, use =IF(COUNTIF($F$2:F2,F2)=1,"acquisition","retention") in the classification column.
What happens if an email address is missing?
The basic formula can classify blank cells as if they were the same customer. Fill in missing emails where possible, or use =IF(D2="","",IF(COUNTIF($D$2:D2,D2)=1,"acquisition","retention")) to leave those rows unlabeled.




