+ Reply to Thread
Results 1 to 17 of 17

move rows between spreadsheets

  1. #1
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9

    move rows between spreadsheets

    Hello,
    We run reports from active directory to see user accounts that have not been logged into the network between 30 and 90 days. We have a few spreadsheets within a workbook (Investigate, Disable, Delete, No Action). All user accounts are imported into the investigate spreadsheet. What we would like to do is automatically take predecided accounts (service accounts that we do not log on to the network - only meant for services, etc) and move them from the investigate spreadsheet into the No Action spreadsheet. These accounts all start with svc. Generic accounts start with GEN and so on.... Is this possible to do with a macro??

  2. #2
    Forum Contributor
    Join Date
    06-03-2008
    Posts
    387
    This sounds pretty simple to do. It might be easier if you give us an example, so I'd recommend creating a duplicate of this workbook and replacing all the actual user data with an example.

  3. #3
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    I hope this sheds some light on what I want to do....we have several factors involved but if you could start me on the right track we can tweak as we see fit...thanks for the help in advance!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-26-2008
    Location
    the office
    Posts
    1
    I actually have a similar issue that I do not know how to write the VBA to do it. In my workbook there is the home page, 'Kent - All,' that the person will fill in their jobs. At the far right of the page there is a column for Active-A, Pending-P, Won-W and Lost-L. I am wishing so that once they fill out the job information and put the appropriate letter that it would populate that line in the appropriate page. So in my example the "white house" project, since it says "w" the whole line would populate in the won spreadsheet. and then if the letter changes the information moves to the appropriate page. I found a way to copy the line, cell by cell, into the appropriate page, but I was hoping to find a way to have it fill in from the top available row down.

    Same here, if someone can give me a start on how to get it that would be much appreciated.

    Thank you!
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Hi,


    Click the button "Click"
    It should move the data to the sheets you requested.
    Attached Files Attached Files
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  6. #6
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    Charles,
    That is exactly what I needed! However, it is pasting multiple copies of the same accounts to the NO ACTION sheet.

  7. #7
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    Charles,
    I take that back....it did work!! I am not sure what I did the first time but I closed it and then reopened and it worked like a charm!! Thanks alot for your time and effort in this! You have saved us hours a month with this!! I appreciate your help!!

  8. #8
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    I have ran the macro against our real data and found that the original rows from the Investigate sheet are not being removed. Can you modify the macro to make this happen??

  9. #9
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    Sorry for the multiple posts but I tried adding another command in the macro to include accounts that end with "bc" but nothing happens. Any advice??

  10. #10
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Hi,

    The code should work if the info you provide is what is actually being looked at in the actual data.

    As for the account that end with "bc" is it the at the end of the account or at the beginning?

    If you could attach another copy of the work book and if possible all the variable that your looking for.
    If I do not respond today someone on the forum may, else I look at it when I get back today.

  11. #11
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    Charles,
    Thanks again for your help. I have attached another sample copy. The bc is at the end of the account name.

    I would like to have the following accomplished:
    Accounts ending with "tlr" moved to the NO ACTION (i.e. fbktlr3, dnbtlr4, etc)
    Accounts with "room" or "conf" moved to the NO DELETE (i.e. psqlunchroom)
    Attached Files Attached Files

  12. #12
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Hi,

    Sorry for the delay, but this is what I came up with. However you have "aaaa" and other info that this code does not address.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9
    Charles,
    The aaaaa and bbbbb accounts that I placed there were only to test if the existing rows that had data were removed. When I run the macro, I would like to have no blank rows between those accounts that were not affected by the macro. The accounts affected by the macro will be those that we know are going to show up on the report. The accounts that we are unaware of (users being terminated, retiring, disability leave, etc) will stay in the investigate sheet until we find the reason that they have not logged into the network for several weeks.
    Everything is great, but it would really be nice to have those rows deleted once they have been moved to the respective sheet.

  14. #14
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Hi,

    All of the data in the sheet for "Investigate" should move to the correct sheets. After the code runs the "Investigate" sheet should be blank except for except for the unaccounted "unaware of" info.

  15. #15
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Hi,

    I re-vamped the code to delete the lines instead of clearing.
    I hope this is what you wanted.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    08-26-2008
    Location
    Lancaster, PA
    Posts
    9

    Talking

    that is exactly what i am looking for Charles!! Thanks again for all your effort and time you have invested. I appreciate tremendously!!

  17. #17
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Move colum data to row then delete those rows
    By Davidy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2011, 05:54 PM
  2. Move Blocks Of Data In Columns To Rows
    By phillim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2008, 03:27 PM
  3. Move rows only does the first one
    By treva26 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2007, 12:01 AM
  4. Move data into empty rows when i delete old data
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2007, 05:56 AM
  5. Using VBA to move rows to another sheet, faster way?
    By jasoncw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2007, 07:41 PM

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