+ Reply to Thread
Results 1 to 4 of 4

Row is moving...

  1. #1
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Row is moving...

    I ran a macro just now and there were unexpected results.
    This is because I was relying on copying data from row 101 to row 20.

    But something had changed in the worksheet when I was cutting/pasting, inserting, deleting rows etc.
    and row 101 was now in row 90 something!

    I just found out why the row had been moving.
    I was using this command ActiveCell.EntireRow.Delete instead of
    ActiveCell.EntireRow.Clear

    Even so, what can I do to permanently lock in the data in row 101 so that it was always be there? Even if I delete rows?


    Thanks!
    Last edited by ChrisXcel; 04-01-2014 at 11:34 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Row is moving...

    What is in row 101? if it is data, then if you delete rows above, it will move up
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: Row is moving...

    Quote Originally Posted by FDibbins View Post
    What is in row 101? if it is data, then if you delete rows above, it will move up
    There are mostly simple formulas like =D101-C101 etc.
    I hope to stay away from deleting rows, but if it is done in the future, is there some way of keeping the row where it is? Perhaps I should name the row as a range? Then if it moves, the subs that make reference to it, will be OK?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Row is moving...

    giving it a range name is a good idea, try it and see if that solves your problem?

+ 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: 0
    Last Post: 05-21-2012, 06:59 AM
  2. Copying moving range based on moving cell reff.
    By Varmark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2011, 04:47 AM
  3. Charts 5 day moving average, 10 day moving average
    By monalisa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2008, 09:50 PM
  4. Moving average of a moving average in the same cell
    By philroberts1983 in forum Excel General
    Replies: 8
    Last Post: 09-16-2008, 07:36 AM
  5. Replies: 3
    Last Post: 02-17-2006, 12:15 AM

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