Pivot Table Issues

Convert Invoice Module Rows into Columns in Excel

Rana GarciaRana Garcia Dec 2, 2026 869 views

Question details

Convert a list of client-module combinations into one row per client, with a Y or N indicator for each module.

Convert Invoice Module Rows into Columns in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
An invoice table contains one client and module combination per row, and the user wants to compare modules across clients.
Observed behavior
The desired table has a separate column for each module and shows Y when a client has that module or N when they do not.
Before you start

Check that the source table has a header row and separate Client Name and Module Name columns. Fill in any missing client or module names before creating the PivotTable.

Solution 1Recommended

Create a PivotTable and convert counts to Y or N

Use this method to group clients and modules, then create a separate Y/N table from the PivotTable counts.

1
Insert a PivotTable

Select a cell in the source table, choose Insert > PivotTable, confirm the table range, and select where to place the PivotTable.

2
Arrange the fields

In the PivotTable Fields pane, drag Client Name to Rows and Module Name to Columns. Drag Module Name to Values as well.

3
Count module records

In the Values area, open Value Field Settings for Module Name and select Count. Each count indicates how many source rows match that client and module.

4
Display missing combinations as zero

Open PivotTable Options, select the Layout & Format tab, and enter 0 in the box for empty cells.

5
Create Y and N indicators

In a separate output area, copy the client and module headings. For each count cell, enter a formula such as =IF(B5>0,"Y","N"), replacing B5 with the corresponding PivotTable cell, then fill the formula across and down.

Create a PivotTable and convert counts to Y or N
Refresh after source changes: Right-click the PivotTable and choose Refresh after adding or changing source records. If clients or modules are added, check the separate Y/N table and extend or adjust its headings and formulas.
WPS Spreadsheets

Build a client-module matrix in WPS Spreadsheets

Create a PivotTable in WPS Spreadsheets to count client-module records, then use an IF formula to show Y or N in a separate table.

  1. 1. Open the invoice table: Open the Excel file in WPS Spreadsheets and select a cell in the table containing Client Name and Module Name.
  2. 2. Insert a PivotTable: Choose Insert > PivotTable, confirm the source range, and choose where to place the PivotTable.
  3. 3. Set up the fields: Drag Client Name to Rows and Module Name to Columns. Add Module Name to Values and set its summary function to Count.
  4. 4. Add Y/N formulas: In a separate area, enter client and module headings. For each corresponding PivotTable count, use a formula such as =IF(B5>0,"Y","N"), then fill it across and down.
Summarize client-module combinations in a PivotTableConvert module counts into Y or N indicators with formulasOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet tools in a free Office suite
QA img-9

Frequently Asked Questions

What happens if a client has the same module on several invoice rows?

The PivotTable count will be greater than one. The formula =IF(B5>0,"Y","N") still returns Y because at least one matching row exists.

Can I leave the PivotTable as counts instead of using Y and N?

Yes. Keep Count of Module Name in the Values area. A positive count means the client has the module; set empty cells to 0 in PivotTable Options if you want zeros for missing combinations.

How do I update the matrix when new invoice rows are added?

Right-click the PivotTable and select Refresh. Make sure its source range includes the new rows, then check whether the separate Y/N table needs additional headings or formulas.

Why does a client or module not appear in the PivotTable?

Check that the source range includes the relevant rows and that Client Name and Module Name are filled in. Then right-click the PivotTable and select Refresh.