Convert Invoice Module Rows into Columns in Excel
Question details
Convert a list of client-module combinations into one row per client, with a Y or N indicator for each module.

- 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.
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.
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.
Select a cell in the source table, choose Insert > PivotTable, confirm the table range, and select where to place the PivotTable.
In the PivotTable Fields pane, drag Client Name to Rows and Module Name to Columns. Drag Module Name to Values as well.
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.
Open PivotTable Options, select the Layout & Format tab, and enter 0 in the box for empty cells.
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.

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. 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. Insert a PivotTable: Choose Insert > PivotTable, confirm the source range, and choose where to place the PivotTable.
- 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. 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.

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.




