Sales for the first 6 weeks

realsongs

New Member
Joined
Dec 18, 2018
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Good evening everyone,

I am struggling to come up with a formula to calculate product sales for the first 6 weeks it came into stock. I am working from a Cube pivot but I have attached a mock table for simplicity.

The table attached shows different product sales per week. However some products didn't arrive into the business until week 7, some arrived in week 30. Is there a formula to calculate the sales for the first 6 weeks of a product arriving?

for example for product 2, I want the formula to calculate sales from week 7 to 12, for product 11 it would be from weeks 30 to 35.

Thanks in advance!

Picture1.png
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Assuming you meant to say Product 10 should be calculated from Weeks 30 to 35 as opposed to Product 11?

If so maybe this formula would work:

VBA Code:
=IFERROR(SUM(TAKE(FILTER(B2:AO2,B2:AO2<>""),,6)),0)

PERSONAL.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
1123456789101112131415161718192021Total Sales
2Product 1938642358742586026385
3Product 2536831472592197484316
4Product 34321788718823258175
5Product 411908464476424482302
6Product 55410089808511495797419
7Product 6734749733221902282295
8Product 7398757843024352915321
9Product 8125661162206098102
10Product 90
11Product 1055324786274986535296
12Product 118751118983311062276
Sheet5
Cell Formulas
RangeFormula
W2:W12W2=IFERROR(SUM(TAKE(FILTER(B2:V2,B2:V2<>""),,6)),0)
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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