Summing on Cust_ID, and Date Range Criteria

hycho

New Member
Joined
May 7, 2015
Messages
1
Hi,

I have two tables: 1) Tbl1 is a user input table and 2) Tbl2 is a pivot table of sales data by Cust_ID and YearMonth.

Below is just a sample data, but you can imagine the pivot table can get quite large due to the number customers and YearMonths. Instead of manually updating the pivot table, is there a way I can my conditions to get the sales count by a date range and cust_id.

For example, for Cust_ID, for the YearMonth period 201301 - 201303, the total sales amount would be 3 (see tbl1 for other examples). I was thinking of using sumproduct, but then the condition spans a time range, and I couldn't just use 3 conditions.

Is there a formula or a combination of functions I can used to compute the total sales base on cust_id and date range? Or any other more efficient solutions would be appreciated.

Thanks,

Hycho


Tbl1: Input Date Range
Cust_IDBgn_YMEnd_YmSales
10012013012013033
100220130620131263
100620131220140150

<tbody>
</tbody>


Tbl2: Details of Sales by YearMonth
Cust_ID201301201302201303201304201305201306201307201308201309201310201311201312201401
1001 1 1 1 1 1 1 1 1 1 1 1 1 1
1002 1 2 3 4 5 6 7 8 9 10 11 12 13
1006 2 4 6 8 10 12 14 16 18 20 22 24 26

<tbody>
</tbody>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

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