Consulting

Results 1 to 6 of 6

Thread: Macro to copy information from the main worksheet by date and city criteria and paste

  1. #1
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    257
    Location

    Macro to copy information from the main worksheet by date and city criteria and paste

    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.

  2. #2
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    257
    Location
    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

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,103
    Location
    Is your date format with the month first or second?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    257
    Location
    All my dates are in format 7.2014, 6.2014, 8.2014 ect.
    Thank you

  5. #5
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    257
    Location
    Hello,
    anyone have any idea how to make this macro?

  6. #6
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    257
    Location
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •