+ Reply to Thread
Results 1 to 5 of 5

Thread: fixing a block of cells

  1. #1
    Registered User
    Join Date
    12-19-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    11

    fixing a block of cells

    Hi there,

    I have a spredsheet with a block of information (B100 to E104), when i delete a line of information anywhere above this block, the starting row of this block is now minus 1 (ie 99) and keeps reducing everytime i delete a line however i need to keep this block on the same row number, any ideas of how i can achieve this??

    Thanks in advance for any help

  2. #2
    Forum Guru Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,276

    Re: fixing a block of cells

    Try just clearing the contents of the row instead of deleting the rows. Select the row as you would, right click and the select "Clear Contents".
    Please leave a message after the beep!

  3. #3
    Valued Forum Contributor
    Join Date
    06-09-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    347

    Re: fixing a block of cells

    Probably the easiest way is to delete the contents of the rows above the block you want to preserve, rather than deleting the entire row itself, which always moves up the contents of cells below. Depending on what information you want to preserve, you might also try edit > delete > shift cells left.

  4. #4
    Registered User
    Join Date
    12-19-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: fixing a block of cells

    The problem with that is that i have a user form that inputs information into the next open row and rows 6-100 contain formulae that are applied to the information. So if a row is cleared it just leaves a blank row somewhere in the data base. if the row is deleted it doesnt affect the next input and there are no gaps but then the cells i want to stay at line 100 move upwards

  5. #5
    Valued Forum Contributor
    Join Date
    06-09-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    347

    Re: fixing a block of cells

    In that case I think you will have to insert a row at row 99 every time you delete a row further up the spreadsheet. You can do this manually each time or use a simple macro such as this:

    Sub row_add()
    Range("A99").EntireRow.Insert
    End Sub

+ 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.2.0