+ Reply to Thread
Results 1 to 5 of 5

Shift Rows Up using VBA

  1. #1
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Shift Rows Up using VBA

    I'm making a dynamic to do list in Excel where tasks move from one worksheet to another based on the status in a certain column. Here's my code on the workbook module:

    Please Login or Register  to view this content.

    It works except for one thing. When I change a status, it moves to the appropriate worksheet, but I want the rows beneath in the original worksheet to shift up. Usually I would do something like this:

    Please Login or Register  to view this content.

    But I haven't figured out how to make that work here. Any ideas?

    Thanks!!
    Attached Files Attached Files
    Last edited by phelbin; 08-17-2015 at 12:46 PM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Shift Rows Up using VBA

    Hi there,

    It's late here so I haven't tested this fully, but does the following work for you?

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Shift Rows Up using VBA

    Unfortunately that doesn't solve my issue. I'm using the following code to automatically move lines around the workbook based on the value in column D. So I can't use code with Row numbers in it.

    I'm also needing to add this functionality into the following code

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Shift Rows Up using VBA

    Anyone have any ideas?

    Just to clarify...the following code cuts the text and moves it to the proper worksheet. But I also want it to either delete the original row or shift the rest of the rows up before pasting.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Shift Rows Up using VBA

    Hi again,

    Copy the following code to the "ThisWorkbook" VBA CodeModule of your workbook, and see if it does what you need:

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

+ 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. Replies: 6
    Last Post: 06-07-2014, 10:07 AM
  2. Caculating # of Day Shift Hrs & Night Shift Hrs of a Given Shift
    By DaKhoda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2014, 08:36 PM
  3. Replies: 0
    Last Post: 11-12-2013, 04:56 PM
  4. Shift Rows to Column
    By fareen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2013, 05:03 PM
  5. [SOLVED] Delete blank rows between data rows, shift rows up, then repeat
    By excelactuary in forum Excel General
    Replies: 2
    Last Post: 03-11-2013, 11:53 AM
  6. Keep Rows, Prevent Row Shift
    By webmanoffesto in forum Excel General
    Replies: 2
    Last Post: 10-05-2009, 01:47 PM
  7. Vertical shift of rows
    By Ole Nygaard in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-02-2009, 03:58 AM
  8. Help! How do I shift rows down?
    By Sethaholic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2005, 02:02 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