+ Reply to Thread
Results 1 to 4 of 4

Help Needed! a macro to move specific data between sheets

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2011
    Posts
    2

    Help Needed! a macro to move specific data between sheets

    Hello! :-) Thank you in advance for reading!

    I'm feeling useless, as I had to use macros as part of a course in college, but now I actually need one - my mind is blank!

    I'm using excel 2011 for mac, and I need a way to copy rows of data into an additional sheet, if a condition is met. For example if a certain cell contains a particular word/phrase.

    I'm sorting through a database of thousands of stock order entries, and I really need a quick way to separate out orders for certain things, for use at a later date. (...with a mail merge, but that's another task)

    Its very simplistic - just a data dump from our online store. Presently its a single sheet with columns a-k having the customers order number and ship details in, column L is the one with the order contents in.

    If there was say, 'chair' in sheet1column L, I'd like the order record (whole row) copied to sheet 2.

    Could someone help a girl out? :-) I'd really appreciate it, as I'd rather not have to sift it by hand...

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Help Needed! a macro to move specific data between sheets

    Absolutely can help.

    A couple of questions:
    Are you just trying to find the information in Column L?
    Would you like to change the search criteria manually in VBA or would you like to enter the value in a userform then the information is passed to VBA and you don't have to manually change it everytime?

    Also could you please post a sample of you worksheet?

  3. #3
    Registered User
    Join Date
    05-31-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Help Needed! a macro to move specific data between sheets

    Wow, thank you for such a quick reply! I'm already impressed...

    The information I'd like to 'sort by' as it were will all be in column L.

    To be honest - the easier it is to apply, the better. I'm still getting to grips with the VBA on the Mac - it's like walking into your house, but someone flipped it left to right - everything is there, just not where you expect it to be. (bizarrely enjoyable, relearning how to do things!)

    Sample workbook attached. - Thank you! examplesheet.xlsx

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Help Needed! a macro to move specific data between sheets

    Alright,
    Attached is your original workbook updated to include a userform that searches for the value entered into the textbox and copies the entirerow of each found cell and pastes it into the other worksheet. If the value is not found it provides you with a warning message stating so. To show the userform, select the show userform command button at the top of the first worksheet. There are directions from there.

    To view the code hold down the Alt key and press F11. This will bring up Visual Basic, if the code does not show automatically right click on the Search Form on the left hand side and select the view code option. Anything that appears in green is a comment to help you understand.

    Thanks!
    Attached Files Attached Files

+ 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