+ Reply to Thread
Results 1 to 7 of 7

VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce report

  1. #1
    Registered User
    Join Date
    10-01-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    7

    VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce report

    Hello,

    I am working with the excel workbook that has many functions/formulas build in. I was trying to build a VBA code that upon execution searches for all kinds of errors (#N/A, #Value, #REF) and produces the report with cell references. In one of the previous posts I fund this code that searches for #REF and was wondering whether it could be adopted to search for other errors. Any help would be greatly appreciated. Thanks in advance

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce rep

    Untested.



    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-01-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce rep

    The code is failing with the type mismatch error on this line:
    Please Login or Register  to view this content.
    any idea as of why?

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce rep

    maybe something like this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-01-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce rep

    This Code finds all applicable errors, however, it only looks through single tab. Also it does not dislay errors in a separate tab "errors" with the reference to the sheet and cell containing the error.

    I've been playing with the code, but cannot get anywhere.

    Any hlp will be greatly appreciated.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce rep

    Please attach a sample with a desired result.

  7. #7
    Registered User
    Join Date
    10-01-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA code to search for #REF, #VALUE, #N/A within multiple excel sheets and produce rep

    I got the code working by adding the array and dim around RefText. Attaching the code for those who might have the same issue.

    Question: How do I make the code to display the error found in the cell after the cell reference? If there is an error in the sheet, I get the following:Sheet - Compare, Cell - $F$17. But I would like it to display something along the lines of : Sheet - Compare, Cell - $F$17, Error Type - #REF depending on the cell error. I am trying to modify this part:

    Please Login or Register  to view this content.
    Working Code for #REF, #VALUE, #N/A Error types


    Please Login or Register  to view this content.

+ 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. Writing Macro Code To Collapse Multiple Weekly Report Sheets into 4 Quarters
    By akrondan1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2013, 09:29 PM
  2. [SOLVED] VBA Code to Produce Multiple Pie Charts (data in columns)
    By Janc in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-30-2012, 06:48 AM
  3. Replies: 1
    Last Post: 07-15-2012, 05:50 PM
  4. Using Excel to produce a report
    By Sinking Ship in forum Excel General
    Replies: 5
    Last Post: 09-22-2011, 07:53 PM
  5. [SOLVED] How do I produce a running Census report in Excel?
    By Michellle M in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2005, 02:06 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