+ Reply to Thread
Results 1 to 21 of 21

Export to separate documents based on specific critera

  1. #1
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Export to separate documents based on specific critera

    Hey,
    I'm looking for some macro help with the data below, as you can see it's just example data at the moment. I'm wanting the data in this sheet to be copied into new documents based on certain critera, but rememering it's original time order and keeping it in date order.

    1) If a data set is "London Appt" or "York Appt" then it is copied as values with number formats through to a document called: GMain.xlsx into the sheet GMain

    2) If a data set is "Liverpool Appt" or "Manchester Appt" then it is copied as values with number formats through to a document called: IMain.xlsx into the sheet IMain

    I will be adding more data to the MainDoc.xlsx bit by bit so instead of re-copying all of the already copied data it should start by matching the date found at the bottom of BW in he Document and Sheet GMain and then add +1 to the date to find out where to start.

    Location = Column BM
    Date = Column BW
    Time = Column A

    I've manually done the GMain and IMain sheets to show how it is supposed to come out like.
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Export to separate documents based on specific critera

    Hi Hyflex

    Are we looking for anything else besides:
    • London Appt
    • York Appt
    • Liverpool Appt
    • Manchester Appt

    Sheets GMain and IMain look different...which is correct?
    Last edited by jaslake; 01-16-2013 at 05:48 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hi jaslake,

    Well, I'll be adding other apartments to the lists too eventually there will be about 50 different apartments listed.

    For example here are some for the GMain.xlsx sheet:
    London Appt, York Appt, Birmingham, Leeds, Newquay (H), Canterbury Appt, Hull Appt

    For the IMain.xlsx sheet here are some others
    Liverpool Appt, Manchester Appt, Portsmouth, Southampton (B.A), Plymouth Appt, Sunderland, Blackpool

    I hope that is what you are asking about.
    Thank you ever so much for reading

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Export to separate documents based on specific critera

    Hi Hyflex

    That's what I was asking. I'm also asking if your Actual Files look like this

    Main.jpg
    gmain.jpg
    IMain.jpg

    Do they all start on Row 15? Are there no Headers? I'll have other questions.

    I guess I should have ask if we're only talking about IMain and GMain...are there others?
    Last edited by jaslake; 01-16-2013 at 06:26 PM.

  5. #5
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hey Jaslake,

    Thanks once again for your reply.

    In regards to your questions yes my files do look similar to as shown but yes there are headers and other bits of text in rows 1 to 14 of which I would like the macro to ignore, at the moment I only have IMain and GMain eventually I will want to add more but it would be "splitting" and copying data based on other variables not the apartment locations, for now IMain and GMain will be more than sufficient.

    Thanks

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Export to separate documents based on specific critera

    Hi Hyflex

    Similar is not "The Same". Show me what your actual files look like...same structure...same headers...same
    other bits of text in rows 1 to 14 of which I would like the macro to ignore
    data can be sanitized if you wish. Code will be developed around these issues...accordingly, I need to know what they are.

  7. #7
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hi jaslake,

    The top 14 rows will vary all the time, is there no way it can just ignore that top section as the data there never needs to be used.

    Thanks
    - Hy

  8. #8
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hey,

    Does anyone have any idea how to do this, I have no idea how to get even close to the macro able to do it.

    Thanks
    - Hy

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Export to separate documents based on specific critera

    Hi Hyflex

    See post #6...unless we can see what your real data looks like many, if not most of us also
    have no idea how to get even close to the macro able to do it
    If we SEE the actual file structure we perhaps can figure it out...perhaps not.

  10. #10
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hi jaslake,

    Well that's the problem Rows 1-14's data will change all the time, so I can't give details/structure.

    Is it not possible to script a macro around only touching data between: A15 and CE LastRow?

    My current document is exactly the same structure as shown in my examples only currently it has a A1:B13 full of data

    Thanks in advance
    - Hy

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Export to separate documents based on specific critera

    Hi Hyflex

    Could be, perhaps, possibly, maybe...don't know...can't see it. Sayonara.

  12. #12
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hey,

    I've given all I can... I have no idea why you're saying bye in that way,

    Anyone else know how?

    Thanks

  13. #13
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hey,

    Still need some help with this :S

    Thanks.

  14. #14
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Hey,

    Still looking for some help on this one,

    Thanks in advance.

  15. #15
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Bump,

    Anyone able to help

    Thanks

  16. #16
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Up :/

    Someone? :D

    Thanks

  17. #17
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    Bump,

    Still looking for help

    Thanks

  18. #18
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    No one able to help with this?

    Up

    Thanks

  19. #19
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    No one able to help with this?

    Up

    Thanks

  20. #20
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    No one able to help with this?

    Up

    Thanks

  21. #21
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Export to separate documents based on specific critera

    No one able to help with this?

    Up

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1