split data to multiple sheets based on month and summing the values

MKLAQ

Active Member
Joined
Jan 30, 2021
Messages
397
Office Version
  1. 2016
Platform
  1. Windows
hello
I have data in sheet ENTER what I want creating multiple sheets for JAN up o DEC it should copy data from sheet ENTER to sheet relating the month based on COL A in sheet ENTER for instance any data are in JAN month then should copy to sheet JAN and so on the rest of sheets and if I change the data in sheet ENTER then should update the relating sheet months and show the total
sheet ENTER
REPORT (2).xlsx
ABCDE
1DATEBRANDTYPEMODELQTY
21/1/2021CC-SSBMW2010250
31/2/2021CC-SSBMW2011125
41/3/2021CC-SSBMW201366
51/4/2021CC-MMMER202055
62/5/2021CC-MMMER202188
72/6/2021CC-MMMER201799
82/7/2021CC-LLAUDI201114
92/8/2021CC-LLAUDI201512
103/9/2021CC-LLAUDI201615
ENTER


desire result
sheet JAN
REPORT (2).xlsx
ABCDE
1DATEBRANDTYPEMODELQTY
21/1/2021CC-SSBMW2010250
31/2/2021CC-SSBMW2011125
41/3/2021CC-SSBMW201366
51/4/2021CC-MMMER202055
6LTT496
JAN


sheet FEB
REPORT (2).xlsx
BCDEF
22/5/2021CC-MMMER202188
32/6/2021CC-MMMER201799
42/7/2021CC-LLAUDI201114
52/8/2021CC-LLAUDI201512
6LTT213
FEB

sheet MAR
REPORT (2).xlsx
ABCDE
1DATEBRANDTYPEMODELQTY
23/9/2021CC-LLAUDI201615
3LTT15
MAR
 
I know that but now I'm sure 100% the problem is language in PC it ignores the sheets "JAN,FEB,MAR ,APRIL" as in your file it creates sheets based on language of PC even if so that, there is a problem it doesn't copy the data in right location in sheet month see the last row when enter in sheet ENTER .
last thing if there is way to enforce create sheets month by English by used array (JAN,FEB,MAR...etc)
MKLAQ.xlsm
ABCDEF
1IDDATEBRANDTYPEMODELQTY
2CC-SS-BMW-201001/01/21CC-SSBMW2010250
3CC-SS-BMW-201102/01/21CC-SSBMW2011125
4CC-SS-BMW-201302/01/21CC-SSBMW201366
5CC-MM-MER-202004/01/21CC-MMMER202055
6CC-MM-MER-202105/02/21CC-MMMER202188
7CC-MM-MER-201706/02/21CC-MMMER201799
8CC-LL-AUDI-201107/02/21CC-LLAUDI201114
9CC-LL-AUDI-201507/02/21CC-LLAUDI201512
10CC-LL-AUDI-201609/03/21CC-LLAUDI201615
11CC-LL-AUDI-201901/01/21CC-LLAUDI201912
12CC-LL-AUDI-202001/01/21CC-LLAUDI20201
13CC-LL-AUDI-201001/05/21CC-LLAUDI20101
14CC-LL-AUDI-200205/01/21CC-LLAUDI20022
ENTER
Cell Formulas
RangeFormula
A2:A14A2=C2&"-"&D2&"-"&E2


and see in sheet JAN how becomes
MKLAQ.xlsm
ABCDEF
1IDDATEBRANDTYPEMODELQTY
2CC-LL-AUDI-202001/01/21CC-LLAUDI20201
3200222020
4LTT
5
jan
Cell Formulas
RangeFormula
A2A2=C2&"-"&D2&"-"&E2
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
The problem may be caused by the date format that your computer system uses in your country. If you are in Europe, the default date is different from that used in Canada. Cell B14 in your post has 05/01/2021. The macro may be reading the month as 01 which is January instead of 05 which is May.
 
Upvote 0
I entered to setting format date by control panel and this what I found dd/MM/yy what I suppose to change
 
Upvote 0
I tried with another PC I delete any sheet after sheet ENTER and add the data from COL B : F to create the sheets based on month and copy data to over it , but the code make much confusion first it gives me error subscript out of range

VBA Code:
 Set ws = Sheets(Left(MonthName(Month(Target)), 3))

and disable the code in worksheet change event
I enable again by this

Code:
Sub nn()

Application.EnableEvents = True

End Sub

then run and create the month MAR normally but way of showing is unorganized and if I return add new data for the same month it doesn't copy to relating sheet month and return showing error again I put the right way how should show the data in the file I no know if your code does that

MKLAQ (1)
 
Upvote 0
Your link isn't working properly. Please use box.com or dropbox.com.
 
Upvote 0
why it doesn't work the link I entered and download the file normally
 
Upvote 0
Click here for your file. I have made some changes to the macro, tested it and it works properly. Please keep in mind that there are many criteria that the macro has to check. Test it and see how it works.
 
Upvote 0
thanks very much now there is no error but I have some thing need fixing it .

1- I would highlight the last row LTT by gray and bold the font word LTT.

2- when create the months it doesn't create by English as what I want , is there any way to enforce creating sheets by English or I have to reinstall the WINDOWS 10 by English to do that ?
 
Upvote 0

Forum statistics

Threads
1,215,577
Messages
6,125,637
Members
449,242
Latest member
Mari_mariou

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