Stop calculating when a date is reached

Lefty099

New Member
Joined
Jan 24, 2016
Messages
26
Hi guys. I am trying to find a formula that will sum sales up to a specified date, at which point it stops summing.
eg. I have 4 rows dated 01/02/16, 08/02/16, 15/02/16, 22/02/16 and so on.
If those rows are in column B I want the relevant row in Column C to sum up the figures that are updated daily up until the date specified. eg. $10000 up until the 08/02/16.
If we sell another $4000 on the 09/02/16, I need the row dated 15/08/2016 to be $4000 and the previous line to stay at $10000.
There is a master cell at the top which would read total monthly sales, being $14000 at this point.
Brief.
A1 = Running Total of sales.
A2 = 08/02/16 B2= Sales up to A2
A3 = 15/02/16 B3 = Sales Between 08/02/16 and 15/02/16
A4 = 22/02/16 B4 = Sales Between 15/02/16 and 22/02/16

I hope this makes sense.

Thanks
 

Book1
ABCDEFGHIJKLMNOP
1Today26/01/2016NameHours Per WeekWrittenProfitDeliveredProfit2Written TargetDelivered TargetSales ID #
2Start Of Month1/01/2016Joe38#VALUE!#VALUE!#VALUE!#VALUE!$71,028$63,9255755
3Days In Month31Billy30#VALUE!#VALUE!#VALUE!#VALUE!$56,075$50,4675723
4Month Of Year1Bazza38#VALUE!#VALUE!#VALUE!#VALUE!$71,028$63,9255641
5Days Gone In Month25John1#VALUE!#VALUE!#VALUE!#VALUE!$1,869$1,6825788
6% Of Month Gone80.65%
7Total Hours Allocated107
8Store Written Target200000
9Store Delivered Target180000
10
117.75Sales Per PeriodTotal ProfitSales per SalespersonProfit Per Salesperson
12Weekly Target$17,757.0157555723564157885755572356415788
13Week 18/01/2016
14Week 215/01/2016
15Week 323/01/2016
16Week 431/01/2016
17Total$0.00$0.00
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Sheet1
Cell Formulas
RangeFormula
J2=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,'C:\Users\User\Desktop\[New Targets2.xlsx]Calculations'!H2,'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!T:T)
J3=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,'C:\Users\User\Desktop\[New Targets2.xlsx]Calculations'!H3,'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!T:T)
J4=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,'C:\Users\User\Desktop\[New Targets2.xlsx]Calculations'!H4,'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!T:T)
J5=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,'C:\Users\User\Desktop\[New Targets2.xlsx]Calculations'!H5,'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!T:T)
K2=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!V:V)
K3=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!V:V)
K4=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!V:V)
K5=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!AD:AD,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Written report'!V:V)
L2=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!K:K)
L3=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!K:K)
L4=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!K:K)
L5=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!K:K)
M2=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!L:L)
M3=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!L:L)
M4=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!L:L)
M5=SUMIF('C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!T:T,[@Name],'C:\Users\User\Desktop\[New Targets2.xlsx]Delivered report'!L:L)
N2=($B$8/$B$7)*I2
N3=($B$8/$B$7)*I3
N4=($B$8/$B$7)*I4
N5=($B$8/$B$7)*I5
O2=($B$9/$B$7)*I2
O3=($B$9/$B$7)*I3
O4=($B$9/$B$7)*I4
O5=($B$9/$B$7)*I5
B1=TODAY()
B2=TODAY()-DAY(TODAY())+1
B3=DAY(DATE(YEAR(B1),MONTH(B1)+1,1)-1)
B4=MONTH(DATE(YEAR(B1),MONTH(B1)+1,1)-1)
B5=TODAY()-B2
B6=B5/B3
B7=SUM(I:I)
B8='C:\Users\User\Desktop\[New Targets2.xlsx]Main Page'!J1
B9='C:\Users\User\Desktop\[New Targets2.xlsx]Main Page'!J2
B11=B3/4
B12=(N2/B3)*B11
B13=B2+7
B14=B13+B11
B15=B14+B11
B16=B15+B11
C17=SUM(C13:C16)
D17=SUM(D13:D16)
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Page 2



Book1
ABCDEFGHIJKLMNOP
1DateSalespersonSalesProfit
2CASH SALESupplier 115/01/2016 0:000ZBilly Ball ( 5723 )CASH SALE (CASH)Product 112293673557$1,000.00B272$100.006.915.82
3CASH SALESupplier 115/01/2016 0:000ZBilly Ball ( 5723 )CASH SALE (CASH)Product 111293673557$375.00B272$10.0011.5215.71
4CASH SALESupplier 17/01/2016 0:000DBazza Brown ( 5641 )CASH SALE (CASH)Product 111292907857$276.00B272$150.00119.96-74.51
5CASH SALESupplier 122/01/2016 0:000ZBazza Brown ( 5641 )CASH SALE (CASH)Product 111294092857$154.00B272$10.0044.940.47
6CASH SALESupplier 19/01/2016 0:000ZJoe Blogs ( 5755 )CASH SALE (CASH)Product 111293224757$1,546.00B272$156.0019.55-1.4
7CASH SALESupplier 110/01/2016 0:000ZJoe Blogs ( 5755 )CASH SALE (CASH)Product 211293285357$2,845.00B272$284.0012.2-0.86
8CASH SALESupplier 110/01/2016 0:000ZJoe Blogs ( 5755 )CASH SALE (CASH)Product 212293285357$224.00B272$224.0012.2-0.86
9CASH SALESupplier 119/01/2016 0:000ZBazza Brown ( 5641 )CASH SALE (CASH)Product 211293887257$1,486.00B272$148.0022.49-13.4
10CASH SALE.Supplier 111/01/2016 0:00944801ZJohn Citizen ( 5788 )CASH SALE (CASH)Product 211293352857$46,546.00B272$4,654.0000
11CASH SALE.Supplier 112/01/2016 0:00944801ZBilly Ball ( 5723 )CASH SALE (CASH)Product 211293417657$4,545.00B272$454.0000
12CASH SALE.Supplier 111/01/2016 0:00944869ZJohn Citizen ( 5788 )CASH SALE (CASH)Product 311293369757$1,235.00B272$123.0000
13CASH SALE.Supplier 115/01/2016 0:00944869ABilly Ball ( 5723 )CASH SALE (CASH)Product 312293637157$1,547.00B272$154.00767.6349.64
14CASH SALE.Supplier 115/01/2016 0:00944869AJohn Citizen ( 5788 )CASH SALE (CASH)Product 313293637157$156.00B272$15.0032088.18
15CASH SALE.Supplier 115/01/2016 0:00944869ZJohn Citizen ( 5788 )CASH SALE (CASH)Product 311293637157$651.00B272$65.0000
16CASH SALE.Supplier 115/01/2016 0:00945827ZJoe Blogs ( 5755 )CASH SALE (CASH)Product 311293636357$548.00B272$24.0000
Sheet2
 
Upvote 0
Thanks for providing the example. Can you now explain what, given the data you've provided, you need the formula to do and where it needs to go?

Matty
 
Upvote 0

Forum statistics

Threads
1,216,522
Messages
6,131,146
Members
449,626
Latest member
Stormythebandit

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