+ Reply to Thread
Results 1 to 10 of 10

Moving a row from a main sheet based on a word in a column

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    22

    Moving a row from a main sheet based on a word in a column

    I am trying to move a whole row from a main document to another sheet based on a word in the B row. So I can separate everything into different sheets for easier viewing for the property.

  2. #2
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Moving a row from a main sheet based on a word in a column

    I have a macro that will do just that. Please post your example excel file.

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Moving a row from a main sheet based on a word in a column

    Capture.jpg
    I am going to have a different sheet for every property. I want the row to copy over into the sheet as it shows in the main. How this snip helps. Or do you want my exact file?
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Moving a row from a main sheet based on a word in a column

    Here is a VBA to get you started. It only takes care of the Sheridan properties. Also the code right now is set so you main sheet must be names "Main" and another sheet names "Sheridan", but those can be changed. Without your excel file, I cannot test the code so, give it a whirl. You may need to tweak a few things, just a heads up.







    Please Login or Register  to view this content.
    Last edited by Cutter; 09-21-2012 at 09:23 PM. Reason: Added code tags

  5. #5
    Registered User
    Join Date
    09-20-2012
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Moving a row from a main sheet based on a word in a column

    How can I send you my doc. Would save me time to have you just punch it in.

  6. #6
    Registered User
    Join Date
    09-20-2012
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Moving a row from a main sheet based on a word in a column

    Should be attached. Thanks for all the help! I have taken out the who and the memo. I will paste them back in
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Moving a row from a main sheet based on a word in a column

    Labor Checks Forum VBA.xlsm


    Greggatm,

    I started it for you. Do you have any experience with VBA codes? The Macro I wrote does the first two hotels for you. To do the other hotels you will need to copy the following code and change them for each property. Than paste them in the macro where I specified with a comment. Just have to change the hotel names. Also I suggest that you move the running amount count located to the right of you data to a new sheet, because that is being copied to the other sheets as well. To to run the macro, go to the developer tab and then run macro.




    Please Login or Register  to view this content.
    Last edited by Cutter; 09-21-2012 at 09:23 PM. Reason: Added code tags

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Moving a row from a main sheet based on a word in a column

    @ reagan.kha

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

  9. #9
    Registered User
    Join Date
    09-20-2012
    Location
    Sacramento
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Moving a row from a main sheet based on a word in a column

    I have added othersand its working. But it seems to be stopping at line 218 every time though there are more lines way below?. i have copied everything to point. Is there someting I need to change to make sure it continues?

  10. #10
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Moving a row from a main sheet based on a word in a column

    I may be stopping at line 218 because the value in Column A is blank. The code is set up so that it will run through Column A to check if there is a name in that cell, if there is then it will copy, if it is blank then the code will stop. If this solves you problem please mark the thread as SOLVED. And add to my reputation points if you found my suggestions helpful! 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