+ Reply to Thread
Results 1 to 6 of 6

#ref error

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Maine US
    MS-Off Ver
    Excel 2003
    Posts
    3

    #ref error

    I have a spreadsheet with 13 worksheets in it. The worksheets are the months of the year and the last worksheet is a totals sheet.
    I import data into each monthly sheet and total the data in the totals sheet.

    Here is the formula: =IF(ISNUMBER(SEARCH("DATA",JANUARY!A130)),JANUARY!C130,"")

    Once I import the data into the monthly worksheet and than delete the imported data my formulas on the totals sheet change to:

    =IF(ISNUMBER(SEARCH("DATA",JANUARY!#REF!)),JANUARY!#REF!,"")

    How do I stop this from happening?

    Thank you
    Last edited by xcaliber13; 01-08-2014 at 11:21 AM.

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

    Re: #ref error

    Try using ClearContents instead of Delete when you remove the imported data.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: #ref error

    You need to copy and paste back Special, Values only before importing data. This will remove formulas and leave values.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: #ref error

    Where are you deleting the imported data, from January!?
    Do you want to convert the formulas in the Total sheet to constants?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    01-08-2014
    Location
    Maine US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: #ref error

    Jonmo1

    That did it. Just what I was looking for. Thank you

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

    Re: #ref error

    You're welcome.

+ 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. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  2. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  5. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

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