Function Problems

Classify Customer Orders as Acquisition or Retention in WPS Spreadsheets

Natalie TaylorNatalie Taylor Dec 2, 2026 868 views

Question details

Classify each customer's first order as acquisition and subsequent orders as retention using their email address.

Classify Customer Orders as Acquisition or Retention in WPS Spreadsheets
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.
Before you start

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.

Solution 1Recommended

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.

1
Add a classification column

Enter a heading such as Classification in an empty column, for example cell E1.

2
Enter the formula

Select E2 and enter =IF(COUNTIF($D$2:D2,D2)=1,"acquisition","retention"). Press Enter.

3
Fill down

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.

4
Check the results

Review column E: the earliest row for each email should say acquisition, and subsequent rows with the same email should say retention.

Use COUNTIF to classify orders by email
Keep email addresses consistent: COUNTIF is not case-sensitive, but extra spaces can prevent matching. Also check for missing emails or customers who use different email addresses.
Classify customer orders

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. 1. Open the order table: Open WPS Spreadsheets and select Open to load your workbook.
  2. 2. Sort the orders: Select the entire table and use Data > Sort to arrange the order-date column from oldest to newest.
  3. 3. Enter the classification formula: With emails in column D, select E2 and enter =IF(COUNTIF($D$2:D2,D2)=1,"acquisition","retention").
  4. 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.
Classify orders without relying on changing IP addressesOpen and edit Microsoft Excel XLSX and XLS filesFill a single formula down an entire order table
microsoft office alternative - wps office

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.