+ Reply to Thread
Results 1 to 5 of 5

Avoiding reference error when deleting rows in another sheet

  1. #1
    Registered User
    Join Date
    06-17-2016
    Location
    Seattle,WA
    MS-Off Ver
    2013
    Posts
    68

    Avoiding reference error when deleting rows in another sheet

    I have a visual calendar I made using a userform and VBA. The information is fed into separate datasheets and the calendar uses formulas to put the information on the calendar before a macro is ran to merge things together.

    Right now, the calendar works perfectly however I noticed that if I go to one of the datasheets and delete a row, the row in the calendar then gets #REF error inside the formula. This makes it difficult to remove old projects off the calendar and move things up.

    The formulas on the calendar right now are looking at specific sheet for the value "Yes" under the month (Jan-Dec for 2 years) and then taking the name and project name cell values.

    I'm wondering what kind of adjustment I can make to this formula so that a reference error doesn't happen. I looked around and tried to do an INDIRECT/ADDRESS formula but couldn't really get them to work.

    Example formula:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by adrenom; 08-17-2016 at 09:24 AM.

  2. #2
    Registered User
    Join Date
    06-17-2016
    Location
    Seattle,WA
    MS-Off Ver
    2013
    Posts
    68

    Re: Avoiding reference error when deleting rows in another sheet

    Bump, anyone have any ideas?

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Avoiding reference error when deleting rows in another sheet

    Hi,

    You might consider INDEX as a solution

    =IF(ISNUMBER(FIND("Yes",INDEX('HI Project Work Database'!D:D,2))), INDEX('HI Project Work Database'!$B:$B,2)&" - "&INDEX('HI Project Work Database'!$A:$A,2), "")
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Registered User
    Join Date
    06-17-2016
    Location
    Seattle,WA
    MS-Off Ver
    2013
    Posts
    68

    Re: Avoiding reference error when deleting rows in another sheet

    Is there a way to get the formula to be able to pull across and down? I'm attaching a clean copy of an old version of the project.

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Avoiding reference error when deleting rows in another sheet

    The workbook does not appear to have made the trip but you can use ROW() rather than a fixed row number- you may need to add or subtract an amount depending on which row the formula cell is in relation to the referenced cell. Copying across columns will not be a 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. Avoiding Named Table Reference Error when running VBA
    By RZuban in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-30-2015, 04:21 AM
  2. [SOLVED] Reference error when deleting rowsource
    By Jakes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2012, 08:29 AM
  3. Replies: 7
    Last Post: 07-12-2012, 10:30 AM
  4. Replies: 1
    Last Post: 04-30-2012, 12:07 PM
  5. Replies: 1
    Last Post: 04-12-2006, 07:39 PM
  6. Replies: 4
    Last Post: 05-06-2005, 07:06 AM
  7. [SOLVED] Avoiding a circular reference or value error while trying to calculate commission - a challange for me!
    By Bruce Johnson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2005, 07:06 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