+ Reply to Thread
Results 1 to 4 of 4

#REF Error in Formula after running Macro

  1. #1
    Registered User
    Join Date
    08-22-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    #REF Error in Formula after running Macro

    I am nearly there...

    I finally got my two major issues resolved thanks to all your help here in the Forum.

    I have one last issue and then I think I am good to go.

    The attached spreadsheet has a Macro to move rows based on a condition from the (Info) sheet to the (Completed) sheet.
    Unfortunately when the Macro is run, the formula on the Dashboard which pulls data based on the Scheduled W/O date returns a #REF Error due to the the line being deleted by the MACRO.


    Any help is greatly appreciated
    juniDash - Excel Forum.xlsm
    Last edited by junijl; 09-12-2013 at 02:22 PM. Reason: No longer require part of the question answered.

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: #REF Error in Formula after running Macro

    First a gentle chiding ... It would have saved some time (and probably elicited a response fro someone sooner) if you had included an explanation as to what worked and how.

    I did look in the VBA for a module - which is where I would normally expect to see a macro and there isn't one. So then I decided to abandon it as too much effort. But a cup of tea arrived so I gave it another chance and I found some code for the INFO sheet. I assume this is "the macro"


    Essentially this runs for a worksheet change event where you are changing the status to "Closed"

    You get the #REF because the formula refers to a row that no longer exists. So you have a choice:
    1. delete the row on the Dash sheet
    2. or, change the formulae on the INFO sheet so that they survive the row deletion. OFFSET from a header row works well
    3. or, reset the formulae after the deletion

    Basically you get the #REF


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: #REF Error in Formula after running Macro

    I would suggest NOT deleting rows to begin with.
    Instead, ClearContents of the row, then Sort to move the blanks to the bottom.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-22-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: #REF Error in Formula after running Macro

    Thank you both for your suggestions. I will give both a try and see which works best for my needs.

    juni

+ 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] VBA Error when running macro
    By willist in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-24-2012, 04:35 PM
  2. Error in running macro
    By ashahdeo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-11-2012, 08:55 AM
  3. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM
  4. Error while running a macro
    By vijay2482 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2009, 06:34 AM
  5. Formula Error when running Macro
    By treeleaf20 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2009, 09:50 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