+ Reply to Thread
Results 1 to 1 of 1

Shift cells from multiple rows after deleting

  1. #1
    Registered User
    Join Date
    11-29-2007
    Posts
    10

    Shift cells from multiple rows after deleting

    Is it possible to shift cells from different rows after deleting a cell(s)? For example, say I have the follow table:

    x x x x x x
    x x x x x x
    x x x x x x

    I want to delete the first three entries...

    x x x
    x x x x x x
    x x x x x x

    When I do this I would like all the cells to shift accordingly as such:

    x x x x x x
    x x x x x x
    x x x

    Is this possible? Maybe a macro would help?

    Thanks for any help!

  2. #2
    Registered User
    Join Date
    01-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Shift cells from multiple rows after deleting

    I hope it will help:

    Sub Shift_Cells()
    '
    ' Shift_Cells Macro
    '

    '
    Range("D1:F1").Select
    Selection.ClearContents
    Range("D2:F3").Select
    Selection.Cut
    Range("D1").Select
    ActiveSheet.Paste
    End Sub

    Tutorial here: VBA Range

  3. #3
    Registered User
    Join Date
    01-21-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Shift cells from multiple rows after deleting

    duplicate, sorry

+ 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