# Sales for the 6 first months?

#### Erza

##### New Member
Hi

I'm trying to calculate periodically sales for new products, which have been in the market for max 6 monts. After that 6 months the sales of the product is not to be calculated. I have a huge amount of products, where this information should be calculated, so manually calculating is not an option. The products are in rows, and periods are in columns. As the data concerns several years data there is a problem, that some products have in some months zero sales, and in the next month again some sales. This messes up always my calculations. How to truly take only the first 6 months, and leave all the rest uncalculated?

How should I do this? Sorry, I tried, but wasn't able to put an example here...

Erza

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Welcome to the brd; you mention that dates are in columns so I'll assume column headers are exact dates in the first row. Try this in any cell below your data (or modify to be on a different sheet)

=SUMIF(\$1:\$1,">"&TODAY()-182.5,2:2)

then this can be copied down for each product
note that 182.5=365/2 or 6 mths

Erza said:
Hi

How to truly take only the first 6 months, and leave all the rest uncalculated?

Erza[/quot

We really need some sample data.

I think Hazens formula would provide sales for the last 6 months, which if I understand correctly isn't what you need.

GorD, you got it right, just the first 6 months data even if sales continues after that. In the columns there are (row 1) P105, P205, P305 and so on. On the rows (column 1) there are product A, B, C, D, and so on. Sales volumes are there calculated periodically for instance for A:
on row2: 10, 10, 10, 10, 10, 10, 10,.... From this one should take only the first 6 months values to the addition calculated for the period down below.

I would have put better data here if I would have known how...

Br, Erza

wow, I sure missed the aim right in your title - GorD is correct, my entry gives last 6 mths. Try this:

=SUMIF(\$1:\$1,"<"&MIN(\$1:\$1)+182.5,2:2)

still assuming dates entered in your headers although that may need clarification

still using \$ to lock link on header so formula can be copied down

Heres my effort
Book1
ABCDEFGHIJKL
1First 6Mperiod 1period 2period 3period 4period 5period 6period 7period 8period 9period 10
275Product 110111213141516171819
375Product 21011121314151617
460Product 3101010101010
5165Product 425262728293031
675Product 5101112131415161718
Sheet1

See what you think

Now the calculation is done for each product separately. Good information though, but how could that be done so that the data is calculated for every period for those products which are new in that period? For p1: 10, P2: 21, ...., P9: 40, P10: 10?

Thanks again,
Erza

So for my example what would your desired result be ?

GorD,
The results for your example would then be: For p1: 10 (in C7), P2: 21 (in D7), ...., P9: 40 (in K9) , P10: 10 (in L9). Calculate the values fo every column (period) of the new - yellow products. Sorry for my previous unclear message. Hope this clarifies a bit.

Erza

Okay, I understand the question, just not sure how to do it at present.

I'll need to have a think about that

Maybe someone else can help out as I won't be able to look at it till after work

Replies
18
Views
514
Replies
11
Views
174
Replies
10
Views
305
Replies
2
Views
340
Replies
0
Views
325

1,203,239
Messages
6,054,314
Members
444,715
Latest member
GlitchHawk

### 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.

### Which adblocker are you using?

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

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