+ Reply to Thread
Results 1 to 9 of 9

Macro to extract data when certain criteria met

  1. #1
    Registered User
    Join Date
    05-17-2012
    Location
    cheltenham
    MS-Off Ver
    2007
    Posts
    12

    Macro to extract data when certain criteria met

    Hi,

    I am looking for some help in extracting data from multiple workbooks into a new one.

    What i need is to extract the "name of staff" as well as Name, address, postcode, Price 1, Price 2 from multiple books into a new workbook, if the date column has "tba" in it. The fields are all in the same place across the 5 books and I have added an example sheet for people to look at.

    I hope someone can help me and thank you in advance
    Attached Files Attached Files
    Last edited by chriscusick; 08-30-2012 at 05:57 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro to extract data when certain criteria met

    Should the name of staff appear for every row containing the data?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Macro to extract data when certain criteria met

    hi chris,

    try something like:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-17-2012
    Location
    cheltenham
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to extract data when certain criteria met

    Quote Originally Posted by arlu1201 View Post
    Should the name of staff appear for every row containing the data?
    Ideally I would like it to appear as a sort of header, so that you can see which rows belong to whom, but either way is fine to be honest

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro to extract data when certain criteria met

    How would it appear as a header? Would there be multiple headers in your output sheet instead of the 1 header at the top?

  6. #6
    Registered User
    Join Date
    05-17-2012
    Location
    cheltenham
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to extract data when certain criteria met

    Quote Originally Posted by tbar05 View Post
    hi chris,

    try something like:

    Please Login or Register  to view this content.
    Thanks Tbar, quick question though, as my knowledge of macros is somewhat pitiful.

    Does this macro pull the data from more than one workbook and paste the information to a new one?

    ---------- Post added at 07:41 AM ---------- Previous post was at 07:40 AM ----------

    [/COLOR]
    Quote Originally Posted by arlu1201 View Post
    How would it appear as a header? Would there be multiple headers in your output sheet instead of the 1 header at the top?
    Ideally it would be nice for it to appear something similar to:

    NAME 1
    xxxxx xxxxxx xxxxx

    NAME 2
    yyyyy yyyyy yyyyy

    NAME 3
    zzzzzz zzzzzz zzzzz

    (apologies for the terrible "example" layout above)

    though, as I said, if it is easier to just have another field in the row that has the name there for each line, then so be it.
    Last edited by chriscusick; 08-28-2012 at 08:41 AM. Reason: copied another reply into this by accident

  7. #7
    Registered User
    Join Date
    07-12-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Macro to extract data when certain criteria met

    hey chris, the macro only pulls data from active sheet in the open workbook and puts it into sheet2 of that workbook

  8. #8
    Registered User
    Join Date
    05-17-2012
    Location
    cheltenham
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to extract data when certain criteria met

    Hi Tbar05,

    I do apologise I have just read the original posting I put and realised my own error....

    I need the macro to pull data from multiple workbooks and enter it into a new one. I really am sorry about the misinformation. Is it possible to adapt your macro to do this?

  9. #9
    Registered User
    Join Date
    07-12-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Macro to extract data when certain criteria met

    is there multiple sheets in the workbooks you want to pull data from?

    are these other worksheets open, or do you want a macro to open/get data/close the other workbooks (and are the saved in the same location)

+ 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