Every 10 dates should count and sum end of every 10th date

vishu

Board Regular
Joined
Oct 26, 2011
Messages
70
Office Version
  1. 2016
Platform
  1. Windows
Hi,
Column A is Date column where each date/day product list is calculated end of the day in Column F.
Now in Column G need your help i.e. Every end of 1 to 10th, 11 to 20, 21 to 30th/31st (in Month of Feb 28th or 29th) Date need Total Amount
Please help me please

ABCDEFG
ItemQtyRateAmt
01-Apr-24Milk15.550775
Curd3752251000
02-Apr-24Milk850400
Paneer3300900
Curd375225
Khava13003001825
03-Apr-24Milk1250600
Paneer3300900
Amul Butter11701701670
04-Apr-24Milk650300
Paneer3300900
Curd575375
Khava13003001875
05-Apr-24Milk1050500500
06-Apr-24Milk1250600
Milk15.550775
Curd3752251600
07-Apr-24Milk850400
Paneer33009001300
08-Apr-24Curd375225
Khava1300300
Milk12506001125
09-Apr-24Paneer3300900
Amul Butter1170170
Milk650300
Paneer33009002270
10-Apr-24Curd575375
Khava1300300
Milk1050500
Milk1250600177514940
11-Apr-24Milk1250600
Milk15.550775
Curd375225
Milk8504002000
12-Apr-24Paneer3300900
Curd375225
Khava1300300
Milk1250600
Paneer33009002925
13-Apr-24Amul Butter1170170
Milk650300
Paneer3300900
Curd575375
Milk12506002345
14-Apr-24Milk15.550775
Curd375225
Milk850400
Paneer3300900
Curd375225
Khava13003002825
15-Apr-24Milk1250600
Paneer3300900
Milk12506002100
16-Apr-24Milk1250600
Curd375225825
17-Apr-24Milk850400
Paneer33009001300
18-Apr-24Curd375225
Khava1300300
Milk12506001125
19-Apr-24Paneer3300900
Amul Butter1170170
Milk6503001370
20-Apr-24Paneer3300900
Curd575375
Milk1250600187518690
21-Apr-24Milk15.550775
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
@vishu Does this help?

Testing Formula Update.xlsm
ABCDEFGH
1ItemQtyRateAmt
21-Apr-24Milk15.550775 
3Curd3752251000 
42-Apr-24Milk850400 
5Paneer3300900 
6Curd375225 
7Khava13003001825 
83-Apr-24Milk1250600 
9Paneer3300900 
10Amul Butter11701701670 
114-Apr-24Milk650300 
12Paneer3300900 
13Curd575375 
14Khava13003001875 
155-Apr-24Milk1050500500 
166-Apr-24Milk1250600 
17Milk15.550775 
18Curd3752251600 
197-Apr-24Milk850400 
20Paneer33009001300 
218-Apr-24Curd375225 
22Khava1300300 
23Milk12506001125 
249-Apr-24Paneer3300900 
25Amul Butter1170170 
26Milk650300 
27Paneer33009002270 
2810-Apr-24Curd575375 
29Khava1300300 
30Milk1050500 
31Milk1250600177514940
3211-Apr-24Milk1250600 
33Milk15.550775 
34Curd375225 
35Milk8504002000 
3612-Apr-24Paneer3300900 
37Curd375225 
38Khava1300300 
39Milk1250600 
40Paneer33009002925 
4113-Apr-24Amul Butter1170170 
42Milk650300 
43Paneer3300900 
44Curd575375 
45Milk12506002345 
4614-Apr-24Milk15.550775 
47Curd375225 
48Milk850400 
49Paneer3300900 
50Curd375225 
51Khava13003002825 
5215-Apr-24Milk1250600 
53Paneer3300900 
54Milk12506002100 
5516-Apr-24Milk1250600 
56Curd375225825 
5717-Apr-24Milk850400 
58Paneer33009001300 
5918-Apr-24Curd375225 
60Khava1300300 
61Milk12506001125 
6219-Apr-24Paneer3300900 
63Amul Butter1170170 
64Milk6503001370 
6520-Apr-24Paneer3300900 
66Curd575375 
67Milk1250600187518690
6821-Apr-24Milk15.550775 
Sheet1
Cell Formulas
RangeFormula
H2:H3H2=IFERROR(IF(OR(DAY(B3)=11,DAY(B3)=21,DAY(B3)=1),SUM(G2:G$3)-SUM(H1:H$2),""),"")
H4:H68H4=IFERROR(IF(OR(DAY(B5)=11,DAY(B5)=21,DAY(B5)=1),SUM(G$3:G4)-SUM(H$2:H3),""),"")
 
Upvote 0
Solution
@vishu Does this help?

Testing Formula Update.xlsm
ABCDEFGH
1ItemQtyRateAmt
21-Apr-24Milk15.550775 
3Curd3752251000 
42-Apr-24Milk850400 
5Paneer3300900 
6Curd375225 
7Khava13003001825 
83-Apr-24Milk1250600 
9Paneer3300900 
10Amul Butter11701701670 
114-Apr-24Milk650300 
12Paneer3300900 
13Curd575375 
14Khava13003001875 
155-Apr-24Milk1050500500 
166-Apr-24Milk1250600 
17Milk15.550775 
18Curd3752251600 
197-Apr-24Milk850400 
20Paneer33009001300 
218-Apr-24Curd375225 
22Khava1300300 
23Milk12506001125 
249-Apr-24Paneer3300900 
25Amul Butter1170170 
26Milk650300 
27Paneer33009002270 
2810-Apr-24Curd575375 
29Khava1300300 
30Milk1050500 
31Milk1250600177514940
3211-Apr-24Milk1250600 
33Milk15.550775 
34Curd375225 
35Milk8504002000 
3612-Apr-24Paneer3300900 
37Curd375225 
38Khava1300300 
39Milk1250600 
40Paneer33009002925 
4113-Apr-24Amul Butter1170170 
42Milk650300 
43Paneer3300900 
44Curd575375 
45Milk12506002345 
4614-Apr-24Milk15.550775 
47Curd375225 
48Milk850400 
49Paneer3300900 
50Curd375225 
51Khava13003002825 
5215-Apr-24Milk1250600 
53Paneer3300900 
54Milk12506002100 
5516-Apr-24Milk1250600 
56Curd375225825 
5717-Apr-24Milk850400 
58Paneer33009001300 
5918-Apr-24Curd375225 
60Khava1300300 
61Milk12506001125 
6219-Apr-24Paneer3300900 
63Amul Butter1170170 
64Milk6503001370 
6520-Apr-24Paneer3300900 
66Curd575375 
67Milk1250600187518690
6821-Apr-24Milk15.550775 
Sheet1
Cell Formulas
RangeFormula
H2:H3H2=IFERROR(IF(OR(DAY(B3)=11,DAY(B3)=21,DAY(B3)=1),SUM(G2:G$3)-SUM(H1:H$2),""),"")
H4:H68H4=IFERROR(IF(OR(DAY(B5)=11,DAY(B5)=21,DAY(B5)=1),SUM(G$3:G4)-SUM(H$2:H3),""),"")
Thank you thank you thank you very very much sir
 
Upvote 0
@vishu Does this help?

Testing Formula Update.xlsm
ABCDEFGH
1ItemQtyRateAmt
21-Apr-24Milk15.550775 
3Curd3752251000 
42-Apr-24Milk850400 
5Paneer3300900 
6Curd375225 
7Khava13003001825 
83-Apr-24Milk1250600 
9Paneer3300900 
10Amul Butter11701701670 
114-Apr-24Milk650300 
12Paneer3300900 
13Curd575375 
14Khava13003001875 
155-Apr-24Milk1050500500 
166-Apr-24Milk1250600 
17Milk15.550775 
18Curd3752251600 
197-Apr-24Milk850400 
20Paneer33009001300 
218-Apr-24Curd375225 
22Khava1300300 
23Milk12506001125 
249-Apr-24Paneer3300900 
25Amul Butter1170170 
26Milk650300 
27Paneer33009002270 
2810-Apr-24Curd575375 
29Khava1300300 
30Milk1050500 
31Milk1250600177514940
3211-Apr-24Milk1250600 
33Milk15.550775 
34Curd375225 
35Milk8504002000 
3612-Apr-24Paneer3300900 
37Curd375225 
38Khava1300300 
39Milk1250600 
40Paneer33009002925 
4113-Apr-24Amul Butter1170170 
42Milk650300 
43Paneer3300900 
44Curd575375 
45Milk12506002345 
4614-Apr-24Milk15.550775 
47Curd375225 
48Milk850400 
49Paneer3300900 
50Curd375225 
51Khava13003002825 
5215-Apr-24Milk1250600 
53Paneer3300900 
54Milk12506002100 
5516-Apr-24Milk1250600 
56Curd375225825 
5717-Apr-24Milk850400 
58Paneer33009001300 
5918-Apr-24Curd375225 
60Khava1300300 
61Milk12506001125 
6219-Apr-24Paneer3300900 
63Amul Butter1170170 
64Milk6503001370 
6520-Apr-24Paneer3300900 
66Curd575375 
67Milk1250600187518690
6821-Apr-24Milk15.550775 
Sheet1
Cell Formulas
RangeFormula
H2:H3H2=IFERROR(IF(OR(DAY(B3)=11,DAY(B3)=21,DAY(B3)=1),SUM(G2:G$3)-SUM(H1:H$2),""),"")
H4:H68H4=IFERROR(IF(OR(DAY(B5)=11,DAY(B5)=21,DAY(B5)=1),SUM(G$3:G4)-SUM(H$2:H3),""),"")
Sir if possible can get same values from H column to I2 (1 to 10) J2 (11 to 20) K2 (21 to 28/29(Feb),30/31(April/May)) please
 
Upvote 0
Please any help have tried =INDEX(G:G,RANDBETWEEN(1,COUNTA(G:G)),1) but no success
 
Upvote 0
If you are wanting April 1 -10 in I2, April 11 - 20 in J2, April 21 - EOM. in K2, can you clarify where are you wanting the results for May and so on?
In I3, J3, K3. or in I,J,K of the row of 1st of May etc?
Also, can you either tolerate having the relevant date in every row of B, rather than the one date and blanks below?
Or can you work with a 'helper' column having all rows dated?

IF this can be done, do you still need the current 10day total that are in H ?
 
Upvote 0
If you are wanting April 1 -10 in I2, April 11 - 20 in J2, April 21 - EOM. in K2, can you clarify where are you wanting the results for May and so on?
In I3, J3, K3. or in I,J,K of the row of 1st of May etc?
Also, can you either tolerate having the relevant date in every row of B, rather than the one date and blanks below?
Or can you work with a 'helper' column having all rows dated?

IF this can be done, do you still need the current 10day total that are in H ?

1) If possible Date Column remain same as one date others are blank below
2) Yes H Column result as given is perfect and needed.
3) Helper Column - No problem sir
4) Yes sir every months 3 values needed in I2, J2 and K2

Thank you very much sir you helping me a lot
 
Upvote 0
If I understand correctly, see if this helps.
A is a helper column with date per row. It could be another column if being A is a problem.

Testing Formula Update.xlsm
ABCDEFGHIJKL
1Helper DateItemQtyRateAmtDay Amt10 day AmtMonth1st - 10th11th-20th21st-EOM
2453831-Apr-24Milk15.550775 January/24000
345383Curd3752251000 February/24000
4453842-Apr-24Milk850400 March/24000
545384Paneer3300900 April/2414940186905270
645384Curd375225 May/24527545705695
745384Khava13003001825 June/24500053506345
8453853-Apr-24Milk1250600 July/24155000
945385Paneer3300900 August/24000
1045385Amul Butter11701701670 September/24000
11453864-Apr-24Milk650300 October/24000
1245386Paneer3300900 November/24000
1345386Curd575375 December/24000
1445386Khava13003001875 Year Total267652861017310
15453875-Apr-24Milk1050500500 
16453886-Apr-24Milk1250600 
1745388Milk15.550775 
1845388Curd3752251600 
19453897-Apr-24Milk850400 
2045389Paneer33009001300 
21453908-Apr-24Curd375225 
2245390Khava1300300 
2345390Milk12506001125 
24453919-Apr-24Paneer3300900 
2545391Amul Butter1170170 
2645391Milk650300 
2745391Paneer33009002270 
284539210-Apr-24Curd575375 
2945392Khava1300300 
3045392Milk1050500 
3145392Milk1250600177514940
324539311-Apr-24Milk1250600 
3345393Milk15.550775 
3445393Curd375225 
3545393Milk8504002000 
364539412-Apr-24Paneer3300900 
3745394Curd375225 
3845394Khava1300300 
3945394Milk1250600 
4045394Paneer33009002925 
414539513-Apr-24Amul Butter1170170 
4245395Milk650300 
4345395Paneer3300900 
4445395Curd575375 
4545395Milk12506002345 
464539614-Apr-24Milk15.550775 
4745396Curd375225 
4845396Milk850400 
4945396Paneer3300900 
5045396Curd375225 
5145396Khava13003002825 
524539715-Apr-24Milk1250600 
5345397Paneer3300900 
5445397Milk12506002100 
554539816-Apr-24Milk1250600 
5645398Curd375225825 
574539917-Apr-24Milk850400 
5845399Paneer33009001300 
594540018-Apr-24Curd375225 
6045400Khava1300300 
6145400Milk12506001125 
624540119-Apr-24Paneer3300900 
6345401Amul Butter1170170 
6445401Milk6503001370 
654540220-Apr-24Paneer3300900 
6645402Curd575375 
6745402Milk1250600187518690
684540321-Apr-24Milk15.550775100 
Sheet1
Cell Formulas
RangeFormula
J2:J13J2=SUMIF(A:A,"<="&I2+9,F:F)-SUM(J$1:L1)
K2:K13K2=SUMIF(A:A,"<="&I2+19,F:F)-J2-SUM(J$1:L1)
L2:L13L2=SUMIF(A:A,"<="&I2+DAY(EOMONTH(I2,0))-1,F:F)-J2-K2-SUM(J$1:L1)
J14:L14J14=SUM(J2:J10)
A2:A68A2=IF(B2>0,B2,A1)
H2:H3H2=IFERROR(IF(OR(DAY(B3)=11,DAY(B3)=21,DAY(B3)=1),SUM(G2:G$3)-SUM(H1:H$2),""),"")
H4:H68H4=IFERROR(IF(OR(DAY(B5)=11,DAY(B5)=21,DAY(B5)=1),SUM(G$3:G4)-SUM(H$2:H3),""),"")
 
Upvote 0
If I understand correctly, see if this helps.
A is a helper column with date per row. It could be another column if being A is a problem.

Testing Formula Update.xlsm
ABCDEFGHIJKL
1Helper DateItemQtyRateAmtDay Amt10 day AmtMonth1st - 10th11th-20th21st-EOM
2453831-Apr-24Milk15.550775 January/24000
345383Curd3752251000 February/24000
4453842-Apr-24Milk850400 March/24000
545384Paneer3300900 April/2414940186905270
645384Curd375225 May/24527545705695
745384Khava13003001825 June/24500053506345
8453853-Apr-24Milk1250600 July/24155000
945385Paneer3300900 August/24000
1045385Amul Butter11701701670 September/24000
11453864-Apr-24Milk650300 October/24000
1245386Paneer3300900 November/24000
1345386Curd575375 December/24000
1445386Khava13003001875 Year Total267652861017310
15453875-Apr-24Milk1050500500 
16453886-Apr-24Milk1250600 
1745388Milk15.550775 
1845388Curd3752251600 
19453897-Apr-24Milk850400 
2045389Paneer33009001300 
21453908-Apr-24Curd375225 
2245390Khava1300300 
2345390Milk12506001125 
24453919-Apr-24Paneer3300900 
2545391Amul Butter1170170 
2645391Milk650300 
2745391Paneer33009002270 
284539210-Apr-24Curd575375 
2945392Khava1300300 
3045392Milk1050500 
3145392Milk1250600177514940
324539311-Apr-24Milk1250600 
3345393Milk15.550775 
3445393Curd375225 
3545393Milk8504002000 
364539412-Apr-24Paneer3300900 
3745394Curd375225 
3845394Khava1300300 
3945394Milk1250600 
4045394Paneer33009002925 
414539513-Apr-24Amul Butter1170170 
4245395Milk650300 
4345395Paneer3300900 
4445395Curd575375 
4545395Milk12506002345 
464539614-Apr-24Milk15.550775 
4745396Curd375225 
4845396Milk850400 
4945396Paneer3300900 
5045396Curd375225 
5145396Khava13003002825 
524539715-Apr-24Milk1250600 
5345397Paneer3300900 
5445397Milk12506002100 
554539816-Apr-24Milk1250600 
5645398Curd375225825 
574539917-Apr-24Milk850400 
5845399Paneer33009001300 
594540018-Apr-24Curd375225 
6045400Khava1300300 
6145400Milk12506001125 
624540119-Apr-24Paneer3300900 
6345401Amul Butter1170170 
6445401Milk6503001370 
654540220-Apr-24Paneer3300900 
6645402Curd575375 
6745402Milk1250600187518690
684540321-Apr-24Milk15.550775100 
Sheet1
Cell Formulas
RangeFormula
J2:J13J2=SUMIF(A:A,"<="&I2+9,F:F)-SUM(J$1:L1)
K2:K13K2=SUMIF(A:A,"<="&I2+19,F:F)-J2-SUM(J$1:L1)
L2:L13L2=SUMIF(A:A,"<="&I2+DAY(EOMONTH(I2,0))-1,F:F)-J2-K2-SUM(J$1:L1)
J14:L14J14=SUM(J2:J10)
A2:A68A2=IF(B2>0,B2,A1)
H2:H3H2=IFERROR(IF(OR(DAY(B3)=11,DAY(B3)=21,DAY(B3)=1),SUM(G2:G$3)-SUM(H1:H$2),""),"")
H4:H68H4=IFERROR(IF(OR(DAY(B5)=11,DAY(B5)=21,DAY(B5)=1),SUM(G$3:G4)-SUM(H$2:H3),""),"")
Love you sir, tooooo goooooddddd. Thank you very much
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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