+ Reply to Thread
Results 1 to 2 of 2

Keep Reference to a cell after Row or Column is inserted/deleted

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Keep Reference to a cell after Row or Column is inserted/deleted

    I've been using VBA to inset and delete rows.

    Problem is, I've been referring to these rows in other places in the spreadsheets

    When Inset a row, the reference automatically shifts down

    Eg.

    Cell A2 in Sheet2 is referencing to Cell A2 in Sheet1

    When I insert a row between Row 1 and Row 2 in Sheet1, Cell A2 in Sheet2 now references to cell A3

    I want it to keep reference cell A2


    This is similar with delete. If the VBA deleted this same row 2 in Sheet1, Cell A2 in Sheet2 read #REF error and the formula changes to #REF where-ever the original Sheet1.A2 is referenced.

    I want to be able to keep Reference to the new Cell Sheet1.A2.

    Thank you
    Last edited by BlueGunner; 06-30-2010 at 11:01 PM.

  2. #2
    Registered User
    Join Date
    06-21-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Keep Reference to a cell after Row or Column is inserted/deleted

    After searching for 30 mins and not finding anything... I found out now that using INDIRECT would do the job

    Sorry for wasting people's time reading this.

+ 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