Function Problems

Create an Excel Purchase Order Summary Table with COUNTIFS

Chanuka GeekiyanageChanuka Geekiyanage Nov 13, 2026 868 views

Question details

Create a summary table that indicates whether each customer purchased specific items.

Create an Excel Purchase Order Summary Table with COUNTIFS
Product
Microsoft Excel
Device & OS
not provided
Scenario
Purchase order data contains customer IDs and item columns marked Yes for purchased items.
Observed behavior
The desired summary shows Yes for each customer and item combination found in the purchase order data and leaves other cells blank.
Before you start

Check which source column contains customer IDs and which columns contain item purchase flags. The example below assumes IDs are in Sheet1 column A and item flags begin in column D, with Yes marking a purchase.

Solution 1Recommended

Use COUNTIFS to mark purchased items by customer

Use this formula when each item has its own source column containing Yes for purchases.

The formula checks all source rows for the customer ID and a Yes flag in the selected item column. It returns Yes if at least one matching row exists; otherwise, it returns a blank.

1
Set up the summary

On a summary sheet, enter customer IDs in column D starting at D2. Add item headings across row 1 starting at E1, in the same order as the item columns on Sheet1 starting at column D.

2
Enter the formula

Select E2 and enter =IF(COUNTIFS(Sheet1!$A:$A,$D2,Sheet1!D:D,"Yes")>0,"Yes",""). Adjust the sheet name and column references if your data is arranged differently.

3
Fill the table

Drag the fill handle from E2 across the item columns and down the customer rows. The item column reference moves across, while the customer ID reference stays in column D.

Use COUNTIFS to mark purchased items by customer
Include addresses separately: The purchase formula does not retrieve customer addresses. Address information must be available in the source data or another customer list before it can be added to the summary.
Create a purchase summary in WPS

Build the purchase order summary in WPS Spreadsheet

Open your workbook in WPS Spreadsheet and use the same COUNTIFS formula to mark items purchased by each customer.

  1. 1. Open the workbook: In WPS Spreadsheet, choose Open and select the Excel workbook containing your purchase order data.
  2. 2. Arrange the summary: On a summary sheet, enter customer IDs in column D starting at D2 and item headings across row 1 starting at E1, matching the source item columns.
  3. 3. Enter COUNTIFS: Select E2 and enter =IF(COUNTIFS(Sheet1!$A:$A,$D2,Sheet1!D:D,"Yes")>0,"Yes",""). Change the sheet name and references to match your workbook.
  4. 4. Fill and save: Drag E2's fill handle across and down to complete the table, then choose Save to save the workbook.
Summarize customer purchases with COUNTIFSOpen and save Microsoft Excel XLSX filesFill formulas across item columns and down customer rowsUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

What does the COUNTIFS formula check?

It checks Sheet1 column A for the customer ID in D2 and the selected item column for Yes. If both conditions occur in at least one row, the formula returns Yes.

Why does the formula return a blank for a customer?

A blank means COUNTIFS found no row matching both the customer ID and a Yes flag. Check the ID in the summary and the purchase flag in the corresponding Sheet1 item column.

How do I add more items to the summary?

Add item headings in the same order as the source item columns, then drag the formula's fill handle to the right. Check that each formula references the intended source column.

Can a PivotTable include customer addresses?

Yes, if the addresses are included in the PivotTable's source data. Select the source range, choose Insert > PivotTable, and add the address field to the table layout.