+ Reply to Thread
Results 1 to 11 of 11

Move rows in a table based upon a certain criteria.

  1. #1
    Registered User
    Join Date
    12-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Move rows in a table based upon a certain criteria.

    Hello all, I need help with some coding. As it probably seems very easy to most here I just can't pull it off. I have multiple sheets with the same size tables and just need rows to be able to be moved back and forth based on input from a certain cell and just added to the next available blank cell in the desired table. Adding the code from the webpage below works very well but only puts into the worksheet and not into the actual table. Is there any way I could get some help with making it actually input the row into the table itself?

    http://uk.answers.yahoo.com/question...5094757AAUUr4F

    Please Login or Register  to view this content.

    Claim List.xlsm
    Last edited by Sm1tty; 01-03-2014 at 08:56 PM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Move rows in a table based upon a certain criteria.

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    12-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Move rows in a table based upon a certain criteria.

    Awesome. Works perfectly from what I can tell. Now I just got to make it work for all four pages in the workbook.

  4. #4
    Registered User
    Join Date
    12-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Move rows in a table based upon a certain criteria.

    Any way it could be rewritten for all four pages? They are Claims, Police, Sub, and Open.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Move rows in a table based upon a certain criteria.

    The Moving sheet will get differed based on the current sheet. So we can't have a single code.

    Just Paste the code in each sheets code window and change the moving sheet name in each codes

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Move rows in a table based upon a certain criteria.

    Delete the existing code and paste the code onto ThisWorkbook code module
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Move rows in a table based upon a certain criteria.

    Quote Originally Posted by :) Sixthsense :) View Post
    The Moving sheet will get differed based on the current sheet. So we can't have a single code.

    Just Paste the code in each sheets code window and change the moving sheet name in each codes
    True but I need the first sheet, Claims, to be able to only be able to send to Police, Sub, and Open. Then the second sheet, Police, to be able to send to Claims, Sub, and Open. Etc. If I was only sending them to one sheet it would be ok but they will be going back and forth due to what I am doing with them. In column five I will be having a data validation drop down list with the options to move them.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Move rows in a table based upon a certain criteria.

    Correct the column Reference in this line.

    Set rWsName = Cells(Target.Row, "B")

    I just given it as B, you just redirect it to the concerned column where the Moving sheet name is used

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Move rows in a table based upon a certain criteria.

    Same thing. That works for one item but not all three. I have four total worksheets with the same table, nine total columns with roughly 20 rows on each table and in column five, E, I have a validation list that interacts with the code below. Claims, Police, Sub, and Open. I need to be able to send rows to any of the other pages. IE Claims > Police, Sub, or Open. Police > Claims, Sub, or Open. Etc. Say I was on the first page, Claims, the code below works perfectly but like I said it only sends to the pages and not the tables. Any way to fix that?

    Please Login or Register  to view this content.
    The code from the original post is just from that webpage. I did not write that I was just putting that there as a reference of what I was using that worked.
    Last edited by Sm1tty; 01-04-2014 at 08:26 PM.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Move rows in a table based upon a certain criteria.

    ..................
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Move rows in a table based upon a certain criteria.

    Obviously all the help is very much appreciated but isn't what I need and I am sure I'm just not explaining it very well. I am working with liability claims, once I receive one it will automatically be put into the first worksheet, Claims. Upon working it if I need a police report to move forward with the claim I would like to be able to switch it to that worksheet, if I waiting on some sort of subrogation then I would like to be able to change it the Sub worksheet, and finally if I am done working the claim but it is still open for whatever reason I would like to be able to change it to the open worksheet. I would like to be able to change any row on any worksheet to my desired work sheet. The workbook I attached below is the exact one I will be using, if you notice in column E there is a drop down menu in cell with all of the worksheets. I would just like to be able to use that drop down menu to move rows to any table I need to based up the worksheet name. The code that I posted above worked perfectly but it doesn't add it to the table, just the worksheet. All I need is for it to just be added to the table on the desired worksheet.

    My workbook -> Claim List.xlsm

+ 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. Delete and Move Rows based on Criteria
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2013, 10:42 PM
  2. Move Rows between workbooks based on criteria
    By bbennett281 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2013, 10:57 AM
  3. Move rows from worksheet to a workbook based on criteria
    By pjlau in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-18-2012, 10:45 PM
  4. Replies: 1
    Last Post: 04-05-2012, 07:48 PM
  5. Macro to move rows, row by row, based upon specific criteria.
    By luke8182 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-20-2012, 01:05 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