function in excel to get subtotals of each month

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello guys
I have this statement of one year. I want to get the subtotals at the end of each month. For now, I am inserting a column and entering manually each month name next to the dates from 1 to 30 or 31 whatever the case. Then I am using sub total. I want to know whether there Is a function in the menu where I can get the subtotal directly without inserting the column and entering each month manually.?
subtotal at each month.xlsx
ABCD
1LineDateDebitCredit
2102-04-202127285
3203-04-202119966
4305-04-20213800080487
5406-04-202117532
6507-04-202138001
7608-04-2021166529327
8709-04-20212000037125
9810-04-202122673
10911-04-202131621.8244660
111012-04-20219177758540
121113-04-2021149601159063
131214-04-20216647377007
141315-04-20215682650555
151416-04-2021399970183196
161517-04-2021246167110988
171619-04-2021228359
181720-04-2021435
191821-04-202136640129300
201922-04-202197090113085
212023-04-2021114526262
222126-04-20215000025000
232227-04-2021546830000
242328-04-202130000
252429-04-20216695
262530-04-202117648327393
272605-05-202116757
282721-05-20216630
292831-05-202114805922407
302916-06-20214600
313022-06-202127620
323123-06-202111746
333224-06-202116875
343328-06-202120000
353429-06-20216200
363530-06-202114415024000
373601-07-20219924
383702-07-20212854
393805-07-202128706
403906-07-202115414
414007-07-20218000
424108-07-202112802
434209-07-202114650
444310-07-20213896
454412-07-202130020
464513-07-202110500
474614-07-202117368
484715-07-20215730
494816-07-202116369
504917-07-202113217
515019-07-202120556
525120-07-202110610
535222-07-20211723
545323-07-202116540
555426-07-20213100130767
565527-07-202173563.5620249
575628-07-2021193552220480
585729-07-202110492879156
595830-07-2021308496820017
605931-07-202171790237284
616002-08-2021610024244
626103-08-2021266795574620
636204-08-2021637322514321
646305-08-2021452113613855
656406-08-2021228042333671
666507-08-202132688755268
676608-08-20214299863999
686709-08-2021514401464732
696810-08-2021163770182630
706911-08-2021119956180423
717012-08-2021161474120269
727113-08-2021207328.8181354
737214-08-20214400031234
747315-08-20212925045169
757416-08-2021142106144115
767517-08-2021150910132870
777618-08-2021210003377
787719-08-20215791786152
797820-08-2021172013162123
807921-08-20219301492541
818022-08-2021800011475
828123-08-2021149300145812
838224-08-20218349282610
848325-08-2021392135414034
858426-08-20217785055788
868527-08-2021127318129317
878628-08-20214719376495
888729-08-20214500018111
898830-08-2021115647124898
908931-08-2021280198123548
919001-09-202113302
929102-09-202144540
939203-09-202130212
949304-09-20211794
959406-09-202111588
969507-09-202133975
979608-09-20211152740983
989709-09-2021183898168284
999810-09-20215066068173
1009911-09-20218500064447
10110012-09-20212025033323
10210113-09-202110063664711
10310214-09-202184211166154
10410315-09-2021155661117543
10510416-09-2021135773112113
10610517-09-20215566750959
10710618-09-2021108386.8115388
10810719-09-20214133339345
10910820-09-202191048102222
11010921-09-20216244251795
11111022-09-20213500027738
11211123-09-20212562523884
11311224-09-2021131465141853
11411325-09-20211912525322
11511426-09-20215760048720
11611527-09-20216082260949
11711628-09-2021179177184580
11811729-09-20219115791466
11911830-09-202118047732514
12011901-10-20215597
12112002-10-202134828
12212104-10-202119594
12312205-10-202118506101070
12412306-10-2021210004362
12512407-10-20214610063509
12612508-10-20215026318893
12712609-10-202111807895
12812710-10-202115766
12912811-10-202190156122072
13012912-10-20218190135786
13113013-10-20214135075611
13213114-10-20213548014381
13313215-10-2021236
13413316-10-20216036243400
13513417-10-202120000
13613518-10-20212925010977
13713619-10-20212364000
13813721-10-20212150044897
13913822-10-20213747218348
14013924-10-20212000
14114025-10-202144424122004
14214126-10-202110469343661
14314227-10-2021123326124930
14414328-10-202120000
14514429-10-20212522
14614530-10-20211125016598
14714631-10-2021155922
14814701-11-20213460
14914802-11-202138408
15014904-11-202155273
15115005-11-20213520
15215106-11-202121709
15315208-11-202147625
15415309-11-20213070810000
15515410-11-2021220509500
15615511-11-2021484584569675
15715612-11-202181036
15815714-11-2021205399.8239742
15915815-11-2021168600169727
16015916-11-2021108928122170
16116017-11-20216114532050
16216118-11-20213600072642
16316219-11-20218814360340
16416320-11-2021105728266585
16516421-11-202154969
16616522-11-20218885913540
16716623-11-2021211658181405
16816724-11-2021227933458
16916825-11-202159012310
17016926-11-20212727714259
17117028-11-20214375
17217129-11-20211358910699
17317230-11-20211601558857
17417302-12-202133736
17517403-12-20214983
17617504-12-20211145
17717606-12-202111867
17817707-12-202155327
17917808-12-202129981
18017909-12-20219293
18118010-12-20211439.62445
18218111-12-2021901331962
18318212-12-202152689.5456440
18418313-12-20211723613645
18518414-12-20218900688614
18618515-12-20212955519961
18718616-12-20213400043261
18818717-12-20213575937671
18918818-12-2021126036224070
19018919-12-202112650027000
19119020-12-2021137000138449
19219121-12-20213428828406
19319222-12-2021302369775
19419323-12-20214499569710
19519424-12-2021152095876
19619525-12-20214550
19719627-12-2021510209515406
19819728-12-2021173700173182
19919829-12-202129486
20019930-12-2021361633999
20120031-12-2021303275128922
20220101-01-20221
20320203-01-202219678
20420304-01-20222548
20520406-01-20228639
20620507-01-20223404534045
20720611-01-202215342
20820712-01-202219840
20920813-01-2022398
21020914-01-202260301
21121017-01-2022159367205723
21221118-01-2022158416.6159080
21321219-01-20225506922962
21421320-01-2022110032664
21521421-01-20224532732497
21621525-01-2022222522256422
21721626-01-20224014520000
21821727-01-2022281693498
21921828-01-2022124046153387
22021929-01-20223160751025383
22122030-01-20225855532727
22222131-01-2022562755200000
Sheet1

If not possible a code will be helpful.
 
Last edited:
I have never used Excel 2019,

Look through the menus Such as Data

The feature is in very early versions of Excel.

There are also many videos on using the feature with Excel 2019.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I found one option in pivot table and got the subtotals at the end of each month. But they will be helpful only for 1 year only. If the data is for 2 years it will not be helpful. PeterSS's code works for multiple years too.
Anyway thanks for helping Dave. ?
subtotal at each month.xlsm
ABC
1
2
3Row LabelsSum of DebitSum of Credit
4Jan2332589.62275135
5Apr1524220.821502934
6May14805945794
7Jun144150111041
8Jul1401541.561546832
9Aug5163529.825189055
10Sep1966940.821967877
11Oct997129970179
12Nov1972211.841971329
13Dec1803248.141799676
14Grand Total17453620.617379852
15
Sheet2
 
Upvote 0
The Subtotal feature works with multiple years. Please read the posts and look at the examples.
If you do not want the net change for each month, delete that column.
N.B. Do not enter the subtotal formulas, the feature Subtotal enters those formulas.


Cell Formulas
RangeFormula
B27:D27B27=SUBTOTAL(9,B2:B26)
B31:D31B31=SUBTOTAL(9,B28:B30)
B39:D39B39=SUBTOTAL(9,B32:B38)
B64:D64B64=SUBTOTAL(9,B40:B63)
B95:D95B95=SUBTOTAL(9,B65:B94)
B125:D125B125=SUBTOTAL(9,B96:B124)
B154:D154,B210:D210B154=SUBTOTAL(9,B126:B153)
B181:D181B181=SUBTOTAL(9,B155:B180)
B232:D232B232=SUBTOTAL(9,B211:B231)
B233:D233B233=SUBTOTAL(9,B2:B231)
 
Upvote 0
I checked the whole menu bar but I didn't find the functions you are talking about in my version of excel. Can you please record a video of how you are doing it and share with me the link to the video.?
 
Upvote 0
Previous
I have never used Excel 2019,

Look through the menus Such as Data

The feature is in very early versions of Excel.

There are also many videos on using the feature with Excel 2019.

Try searching on line for "Excel version 2019 subtotal feature".

If I recorded a video, it would not help you since I only have access to 2010 and 365.
 
Upvote 0
I do not know if this will help you but

"
How to find the subtotal button in Microsoft Excel 2007/2010/2013/2016/2019 ribbon?
Get Subtotal Button in Ribbon if you do not have Classic Menu for Office. If you did not installed Classic Menu for Office on your computer, this tip will help you find out the Subtotal Button in Microsoft Excel 2007/2010/2013/2016/2019 Ribbon: Click the Data tab; Go to the Outline group; Then you will view the Subtotal button there.
 
Upvote 0
I have the subtotal button in my excel and I have been using it regularly whenever required. But it doesn't have the options to check the sum for each month. I can select the first option, at each change in, Date, in the list of 4 options only. Line, Date, Debit and Credit. There ain't any option to select monthly or yearly.
 
Upvote 0
Try reading post #3.
Now, again after reading your post #3, I finally understood what you were trying to explain. Insert column and apply formula=TEXT(B2,"mmm-yyyy") to get month and year and drag down. Then apply sub total ....?
I was able to get the correct result. Thanks man.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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