Get Your Thinking Caps On!

lbird2

Board Regular
Joined
Dec 10, 2014
Messages
78
Office Version
  1. 365
Platform
  1. Windows
Month0123456789101112
Sales Pattern3%10%21%25%8%9%10%5%2%3%2%1%1%
Production2875005326127512355351289118000
Sales287*3%287*10%
+ 500*3%
287*21%
+ 500*10%
+ 532*3%
287*25%
+ 500*21%
+ 532*10%
+ 612*3%

<colgroup><col><col span="13"></colgroup><tbody>
</tbody>

The hardest part of this may be the explaining.

I'm trying to find the most efficient way of converting production to sales based on a sales pattern.

Thirteen months across the top. The sales pattern shows that 3% of things produced in a given month will be sold withing the same month. 10% will be sold in the next month, and so on.

The Production row shows what was produced for each month. So to convert this to sales, month 0 will be just month 0 production time 3%. Month 1 will be (month 0 production times 10%) + (month 1 production times 3%), etc.

As you can see with the formula I have going, this is going to get nasty!

There has to be a better solution and I can think of no better place to find it. Thanks in advance.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Would this formula work?

Assuming your data begins in A1

formula in B4
=B2*B3

formula in C4 dragged to the end to the right
=(C$2*C$3)+B$4
 
Upvote 0
In the workbook you want this to work in, enter the VBA editor (alt+f11) and create a new module. Copy/Paste this code into that module:

Code:
Public Function SalesPattern(sPattern As Range, sProduction As Range) As Double
Dim i       As Long
For i = 1 To sPattern.Count
    SalesPattern = SalesPattern + sProduction(sProduction.Count + 1 - i) * sPattern(i)
Next i
End Function

Now, use the following formula (cell B4, copy it to the right). I included a handful of manual entry formulas as a double-check.


Excel 2013/2016
ABCDEFGHIJKLMN
1Month0123456789101112
2Sales Pattern3%10%21%25%8%9%10%5%2%3%2%1%1%
3Production2875005326127512355351289118000
4Sales8.6143.7126.23248.31343.41409.5466.52455.63385.73363.07253.94187.04140.44
5Manual Entry8.6143.7126.23248.31
Sheet1
Cell Formulas
RangeFormula
B4=salespattern($B$2:B2,$B$3:B3)
B5=B3*B2
C4=salespattern($B$2:C2,$B$3:C3)
C5=C3*B2+B3*C2
D4=salespattern($B$2:D2,$B$3:D3)
D5=D3*B2+C3*C2+B3*D2
 
Last edited:
Upvote 0
try Copy across
Code:
=SUMPRODUCT($B$2:B2,$B$3:B3)
 
Upvote 0
The function worked perfectly. Thank you!!

So did the others. You guys are great.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,315
Messages
6,124,213
Members
449,148
Latest member
sweetkt327

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