Create table with repeating values based on another table

vipett

New Member
Joined
May 6, 2021
Messages
17
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have a hard time naming this in the title, thus also difficult to search for a solution..

I have a transaction table which contains (among other things):

Company nameCategoryOrder dateSold pieces
1A2021-06-02100
1A2021-06-1820
2B2021-05-0530
1B2021-06-0510
3C2021-05-0650
4B2021-05-0640
etc

I then also have a table that contains "VIP" customers.
Customer name
1
2


I would like to get a table that is like this:

Company nameCategoryMonthPieces
1AMay0
1BMay0
1CMay0
1AJune120
1BJune10
1CJune0
2AMay0
2BMay30
2CMay0
2AJune0
2BJune0
2CJune0

So basically starting with the VIP customer table, then taking the distinct categories and distinct months, then repeat all company names so that is looks like the table above and aggregating all values for each combination of company- category-month.

What is the easiest way of doing this?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top