+ Reply to Thread
Results 1 to 8 of 8

Can you delete a row but keep a cell reference to it in a different sheet?

  1. #1
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Can you delete a row but keep a cell reference to it in a different sheet?

    Good morning all,

    Sheet 1 has some simple table, no formulas.

    Sheet 2 has a column that duplicates Col A from back in Sheet 1. Simple.


    But, due to some entries and sorting and such I delete a row now and then on Sheet 1.

    Those cells in Sheet 2 become #REF!

    So, what once was Sheet2!a5 (which literally used to say ='Sheet1!a5'), says #REF! if I delete that row over in Sheet 1.


    I'm not clear why. There still exists an A5--everyone just slid up a row.

    Is there a way to lock it down to disregard a shift in rows and just return the value of whoever happens to be sitting at address A5?

  2. #2
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,141

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    it will be due to "hard" coded reference.. the solution is to change the reference so that it is not "hard" and is more flexible (ie. remove the $ from cell/column reference).

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,997

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    I'm not clear why. There still exists an A5--everyone just slid up a row.
    Yes, there is A cell A5, but it's not the same one … you have deleted that one. If what you want is ALWAYS to refer to the cell that is currently in the A5 position, that can be done.

    Use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    instead of
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,997

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    it will be due to "hard" coded reference.. the solution is to change the reference so that it is not "hard" and is more flexible (ie. remove the $ from cell/column reference).
    No, that is not the case. Regardless of whether the reference is absolute (hard?) or relative (soft?), if you delete the row, you will get a #REF! error

  5. #5
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    ok, let me go back and toy with those. much thanks. I'll be right back.

  6. #6
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    ok, that worked well. Thank you! I had to make an index column with some integers because dragging down didn't increment the "2" in the example. But, I didn't ask about that too, so...on me.

    works fine now.

    many thanks.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,997

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    No helper column required. Use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,997

    Re: Can you delete a row but keep a cell reference to it in a different sheet?

    And … You're welcome. Thanks for the rep.

+ 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. [SOLVED] Macro - Delete Sheets in Workbook and Rename Sheet per Cell Reference
    By cvici in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2021, 06:13 AM
  2. 2 criteria in reference cells delete row from another sheet
    By sanjuss2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2015, 02:03 AM
  3. Indirect Sheet reference with cell reference left function and text
    By teststrip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2015, 10:31 AM
  4. [SOLVED] Delete A Reference Cell
    By astronotbumi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-23-2014, 11:49 AM
  5. [SOLVED] Calling string inside cell reference to reference another sheet.
    By {=OR(value=array)} in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-26-2013, 04:45 PM
  6. Dragging formula, change sheet reference, but not cell reference
    By Kalilaya0419 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2013, 04:50 PM
  7. [SOLVED] referenced sheet deleted which should not delete the reference formula.
    By jbshew in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-23-2012, 03:19 PM

Tags for this Thread

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