PDA

View Full Version : Macro to copy information from the main worksheet by date and city criteria and paste



k0st4din
08-19-2014, 08:07 AM
Macro to copy information from the main worksheet by date and city criteria and paste in sheets with the same names of cities
Hello everyone,
I would like to ask for assistance from your side, because I can not do it alone finding a macro that can do the following:
I have a excel file (database)
It got more than 40 sheets, but there is one major (database).
I have over 80 000 lines of information that I did and apply manually.
Is it possible to do the following:
In column A2 and down I have dates
in column G2 and down I have city names (just an example: Paris, Germany, London, etc to 28)
I have a sheets (28 in total) with the same city names (just an example: Paris, Germany, London, etc to 28)
On the first day of every month I get information for the previous month, which will bring a database list.
Then filter every city and therefore only the previous month (!!! very important - because I've already moved the preceding months) and put the information only for the last month of the next free line of each city.
Ask for your cooperation for a macro to copy all the information for the last month for each city and put it under the other, which I have already moved past months.
And maybe for me personally, my biggest problem is that in a database - I do not delete anything and re-open the excel file bothers me that when laying the next month, always will copy all data from all years ago, and I want to put only the last (last month).
Here's an example for a city as it relates to others:
From 1.2009 to 7.2014 month I moved everything about Paris (and all other 27 cities).
When I open excel file at the beginning of September I want to port the information only for the month of August.
Ie in some way should be compared to the date that is column A2 and down (because I do not know exactly how much rows will have)
Copy range is A2:J (as rows)
The dates are in column A2:A (as rows)
Cities are in column G2 and down.
I hope someone can help me.
Thank you in advance for your responsiveness.

k0st4din
08-19-2014, 09:45 PM
Hello colleagues,
is there anyone who can help me with my request?
Is there anything that is unclear and therefore you can not help me?
Thank you again

Aussiebear
08-20-2014, 03:09 AM
Is your date format with the month first or second?

k0st4din
08-20-2014, 04:34 AM
All my dates are in format 7.2014, 6.2014, 8.2014 ect.
Thank you

k0st4din
08-22-2014, 01:12 PM
Hello,
anyone have any idea how to make this macro?

k0st4din
08-23-2014, 11:11 PM
Hello everyone,
can anyone help me with this macro, any macro gods of the site, I can not believe I can not find a solution.
Thank you in advance