VBA to copy columns to new sheet with new order and two or more criteria

NenoRMaleN

New Member
Joined
Mar 29, 2019
Messages
2
Hello, everyone


This is my first post here and I have a question


I apologize in advance for my bad English


My girlfriend has a home for elderly people and I want to simplify her work


I have an Excel workbook in which I have made several documents and two lists of people who are housed in an elderly home.


One list is with all accommodated people from 2006 until now.
The second list is for this year only - only for people who were accommodated on 01.01.2019 and all accommodated after that date.


For government statistics every month a new list should be made from annual list, but with different order of columns and in new sheet one column must have formula from column in annual list. A separate list should be made for each house.


An example of an annual list and a monthly list can be found in the attachment and formula in column D (with the new name of this column). In new list Column 'F' - "Contract number" must be empty for now, dates must be in dd.mm.yyyy format


I want to create a button and with this button after entering the month, data to be copied to the new sheets. Perhaps it should be checked whether there is already this month and ask for overwrite...


Thanks in advance for help

File: https://yadi.sk/i/nAtDDQ9QfG3OvQ
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
On each monthly sheet you have columns for "Day of birth" and "Contract number" but I don't see these columns in the annual sheet. Where do you get the data for the birth dates and contract numbers?
 
Upvote 0
Cross posted on multiple sites.

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
@NenoRMaleN
Please supply links to all other sites where you have asked this question.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
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