4 Ways to Find Repeat Customers in Excel or Shopify
You can find repeat customers in Excel or Shopify in four ways: a COUNTIF helper column, a PivotTable that counts visits per person, a Shopify customer segment, or Shopify's built-in customer reports. The good news is you probably already have the data. It's sitting in a sales export, a booking list or your Shopify admin, just not arranged by person yet.
Once you can see who comes back, you can thank them, reward them and notice when they stop showing up. That list is the starting point for everything in our guide on how to get repeat customers. Let's build it.
TL;DR
- Decide what "repeat" means before you count anything: one ID per person, separate days, completed sales only.
- In Excel or Google Sheets, a COUNTIF column flags anyone who appears more than once.src1src2
- A PivotTable gives you one tidy row per customer, and Distinct Count stops same-day purchases from inflating the numbers.src4
-
In Shopify, a customer segment with
number_of_orders > 1gives you a live list of repeat buyers.src5 - Shopify's Returning customers report shows everyone with two or more orders, no setup needed.src6
Before you count: decide what "repeat" means
This step takes five minutes. Skip it and your numbers will be wrong.
Use one ID per person. Names are messy. "Sam K.", "Samantha Kim" and "sam kim" look like three people to a spreadsheet. An email address or phone number is far more reliable, so use that column if you have it.
Count visits on different days, not transactions. If a bakery rings up a coffee and then a croissant five minutes later, that's two transactions but one visit. Counting transactions makes your regulars look more loyal than they are, and makes one-timers look like regulars.
Count completed sales only. Drop refunds, cancelled orders and the test orders you placed while setting up your shop.
Pick a time window. Twelve months is a sensible default. But think about your rhythm: a pet groomer might see a good client every six to eight weeks, while a bakery regular might come in four times a week. A "repeat customer" at a car wash and at a bridal boutique are very different animals.
Write your definition at the top of the sheet. Future you will thank you.
Way 1: Flag repeat customers with COUNTIF (Excel or Google Sheets)
This is the quickest method and it works in both Excel and Google Sheets. COUNTIF simply counts the cells in a range that match what you're looking for.src1 Google Sheets has the same function with the same behavior.src2
- Export your sales. You need at least two columns: a customer ID (email or phone) and a date. Most POS systems, booking apps and online stores have an export button somewhere in their reports or customers area.
- Sort by customer. Select your data, then sort by the customer column so each person's visits sit together.
-
Add a helper column. If customer IDs are in column B, rows 2 to 500, put this in C2 and fill it down:
=COUNTIF($B$2:$B$500,B2). Each row now shows how many times that customer appears in the whole list. - Filter for anything above 1. Those are your repeat customers.
- List each person once. Copy the filtered rows to a new sheet and remove duplicates on the customer column. Now you have a clean list of names.
Want to know whether a specific visit was someone's first or a return trip? Use a running count instead: =COUNTIF($B$2:B2,B2). Notice only the first $B$2 is locked. The range grows as you fill down, so the first time a customer appears you get 1, the second time 2, and so on. Exceljet uses the same idea in a formula that returns 1 for new customers and 0 for repeat ones, which is handy if you want to count new versus returning customers per month.src3
Once you have the list, the rate is one division away: repeat customers divided by total customers. If you want a few different ways to work that out, see our guide on how to work out your repeat customer rate.
Way 2: Build a PivotTable that counts visits per customer
COUNTIF is great for a few hundred rows. Once your export runs into thousands, a PivotTable is calmer.
- Click anywhere in your data and choose Insert > PivotTable.
- Drag the customer column into Rows.
- Drag the date column into Values. Excel will usually show "Count of Date".
- Sort the counts from largest to smallest. Your best regulars rise to the top.
- Filter the values to show only counts greater than 1.
Here's the catch. A plain count still counts transactions, so the coffee-plus-croissant problem is back. To count distinct days, tick Add this data to the Data Model when you create the PivotTable, then open Value Field Settings on the date field and choose Distinct Count. Both options arrived in Excel 2013.src4 If you don't see the checkbox (it can be missing in some setups, including some Mac versions), fall back to Way 1 and remove duplicate customer-and-date pairs before counting.
A hair salon doing this might find 300 names in a year's export and 40 people who came in on four or more separate days. Those 40 are the clients worth knowing by name, if you don't already.
Way 3: Filter repeat buyers in Shopify with a customer segment
If you sell on Shopify, you can skip the export entirely. Shopify's customer segments let you filter customers by how many orders they've placed.src5
- In your Shopify admin, go to Customers and start a new segment.
-
Enter the filter
number_of_orders > 1. Shopify's own example usesnumber_of_orders > 10, so adjust the number to match your definition of a regular.src5 - Save the segment. It updates by itself as new orders come in.
Then get a bit smarter with it. The amount_spent filter shows who spends the most, and the last_order_date filter accepts relative dates. Shopify's example, last_order_date >= -7d, finds customers whose last order was in the past week.src5 Flip it around and combine filters, for example number_of_orders > 2 AND last_order_date < -90d, and you've got loyal customers who've gone quiet for three months.
That second list is gold. Those people already like you. A friendly note often brings them back, and these win-back messages for customers who stopped coming give you wording to start from.
You can export any segment as a CSV and run it through Way 1 or Way 2 if you want to slice it further.
Way 4: Use Shopify's built-in customer reports
No filters, no formulas. Shopify keeps its customer reports under Analytics > Reports; filter the list by the Customers category to find them.src8 Three are especially useful:
- Returning customers shows every customer whose order history includes two or more orders.src6
- One-time customers shows everyone who has ordered exactly once.src6
- New vs returning customers shows how many first-time and returning customers you had in a given period.src6
One small wrinkle. Shopify defines a returning customer as someone who places an order when their history already includes at least one order.src7 So the "returning" count in a date range describes who came back during that period, while the Returning customers report lists everyone who has ever ordered twice. Both are useful. Just don't compare one to the other and panic.
Which reports you see can depend on your Shopify plan, so check what's in your admin before you rely on one.
Which method should you use?
| Method | Tool | Effort | Best for |
|---|---|---|---|
| COUNTIF helper column | Excel or Google Sheets | Low | Small lists, any POS or booking export |
| PivotTable with Distinct Count | Excel | Medium | Thousands of rows, counting visit days |
| Customer segment | Shopify | Low | Live list of repeat or lapsed online buyers |
| Customers reports | Shopify | Lowest | A quick look with no setup |
If you're in Shopify, start with Way 4, then build a segment. If you run a salon, gym or groomer with a booking system, export it and use Way 1.
What if your sales data doesn't have names?
Plenty of walk-in businesses hit a wall here. A car wash or a barbershop that takes cash, or card payments with no customer profile attached, has a list of sales but no idea who made them. No ID, no repeat count.
A few ways around it:
- Check your POS customer directory. Some systems track visits per saved customer. Square's Customer Directory, for example, has a Visit Frequency filter for finding customers by how many times they've visited in a period.src9 Menus change, so look for "visits" or "frequency" in yours.
- Collect an ID at checkout. A phone number at the register or an email for receipts is enough, as long as you ask permission.
- Let a loyalty card do the counting. Every stamp is a visit with a name attached. A digital punch card records those visits for you, without anyone typing into a spreadsheet.
What to do once you have the list
A list nobody uses is just a nicer spreadsheet. Here's what to do with it this month:
- Thank your top ten. In person, by text or with a handwritten note. Tiny gesture, outsized effect.
- Note their usual. The cut, the cake, the class time. Next visit, mention it.
- Nudge the one-timers. Customers with exactly one order are your biggest opportunity. Our piece on why first-time customers don't come back covers how to earn that second visit.
- Catch the quiet regulars. Anyone who's gone well past their usual gap gets a friendly "we miss you".
- Re-run it monthly with the same definition. Changing the rules each time makes the trend meaningless.
- Reward the habit. A simple stamp card gives regulars a reason to keep the streak going.
If spreadsheets aren't your thing
All four methods work. They also all depend on you remembering to export, clean and count. If you'd rather have the counting happen on its own, LoyalDeck gives you a digital stamp card or points program that lives in your customers' Apple Wallet or Google Wallet, with no app to download. Customers scan a QR code at your counter (or open a one-time stamp link if you sell online), and your dashboard shows scans and repeat visits as they happen. When a regular goes quiet, you can send them a message straight from the same place.
Whichever route you pick, pick one this week. The list is the easy part. Knowing your regulars by name is where it starts to pay off.
-
↩
Microsoft Support, "COUNTIF function." https://support.microsoft.com/en-us/office/countif-function-e0de10c6-f885-4e71-abb4-1f464816df34
-
↩
Google Docs Editors Help, "COUNTIF." https://support.google.com/docs/answer/3093480
-
↩
Exceljet, "New customers per month." https://exceljet.net/formulas/new-customers-per-month
-
↩
Excel University, "Count Distinct Values in an Excel 2013 PivotTable." https://www.excel-university.com/count-distinct-values-in-an-excel-2013-pivottable/
-
↩
Shopify Help Center, "Shopify-based customer segment filters." https://help.shopify.com/en/manual/customers/customer-segmentation/reference-guide/shopify-segments
-
↩
Shopify Help Center, "Customers reports." https://help.shopify.com/en/manual/reports-and-analytics/shopify-reports/report-types/default-reports/customers-reports
-
↩
Shopify Help Center, "Customers reports" (definition of a returning customer). https://help.shopify.com/en/manual/reports-and-analytics/shopify-reports/report-types/default-reports/customers-reports
-
↩
Shopify, "Returning ecommerce visitors," Shopify Enterprise blog. https://www.shopify.com/enterprise/blog/returning-ecommerce-visitors
-
↩
Square Seller Community, staff reply by the Seller Community Manager, July 26, 2018. https://community.squareup.com/t5/Questions-How-To/Can-you-add-add-customers-who-visited-once-over-12-months-ago-to/m-p/88240
Ready to boost your customer loyalty?
LoyalDeck helps local businesses turn one-time visitors into regulars with digital loyalty cards, rewards, and real-time insights. Free for your first location.
Comments (0)
Log in to leave a comment.