Reputation: 1
I just needs some help on a formula to count the numbers of orders in the orders table for each customer.
Table Name = "Orders" See the image:
So in another worksheet, the formula counts the orders for each individual customer. I countn't get the countif to work as each amount of orders vary between customers. The PivotTable didn't work either as there are blank spaces in the customer numbers.
Any other solutions to my problem?
Upvotes: 0
Views: 3584
Reputation: 35915
Quick way to fill the blank cells:
All blank cells in the range are now selected. Without changing the selection,
Now all previously blank cells contain a formula that references the cell right above. Copy the columns and paste them over themselves with Paste Special > Values to replace the formulas with the values.
Now you can build a pivot table for the count.
As an alternative to filling in the blank cells you could use a helper column with a formula along the lines of
=IF(LEN(B5)=0,H4,B5)
Start the formula in cell H5 and copy down. Now you can use a pivot table with this helper column. You can hide the helper column if it upsets your spreadsheet design.
Upvotes: 1