+ Reply to Thread
Results 1 to 16 of 16

How to find all #N/A in workbook?

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    How to find all #N/A in workbook?

    Hi,

    it is possible to find all #N/A cells in Excel?
    What is the best option?

    Just range and find method?

    Jacek

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,695

    Re: How to find all #N/A in workbook?

    Maybe you could think about conditional formatting, using the formula:

    =ISNA(A1)

    applied to all used cells in the sheet.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    oo this could be nice.

    So create conditional formatting though VBA, Add to each worksheet, check if conditional formatting is there and retrive cells.

    Hmm i would have compare with Find method.

    Best,
    Jacek

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    After research i do not think so there is better way than find.

    It would be nice if any Expert here will confirm...

    Jacek

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

    Re: How to find all #N/A in workbook?

    maybe so
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: How to find all #N/A in workbook?

    What do you mean exactly by " finding" ? Locating each one or counting them?

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: How to find all #N/A in workbook?

    If you are talking about only "#N/A" error and in any Rows/Columns, Find method would be the best as long as I know.

  8. #8
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    thank you Guys,

    What do you mean exactly by " finding" ? Locating each one or counting them?
    Locating - like worksheet, named range there and outputting to separate worksheet as log.

    On Error Resume Next: Err.Clear
    ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas, 16).Interior.ColorIndex = 43
    this will find formulas only, how this can help to find #N/As?

    Jacek

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

    Re: How to find all #N/A in workbook?

    try xlCellTypeConstants instead of xlCellTypeFormulas

  10. #10
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    What does xlCellTypeConstans means? What is constant ? Why #N/A is constant here?

    Jacek

  11. #11
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    Ok i wrote something like this:
    Please Login or Register  to view this content.
    End Sub

    then i have problem here - i am getting error 2042:

    Please Login or Register  to view this content.
    i suppose because setting range is also N/A.
    How can i avoid this?

    Please help,
    Jacek

  12. #12
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    Please find example workbook.
    Attached Files Attached Files

  13. #13
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: How to find all #N/A in workbook?

    Do you mean you are actually seeing an error message box that says 2042 is the error? (Error 2042 is the error value of a #N/A error but it shouldn't stop the code from working)
    Rory

  14. #14
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: How to find all #N/A in workbook?

    @jaryszek, try something like this:

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    I am seeing Error 2042 and it is working.

    the problem is:
    Screenshot_1.png

    that i want to register each rng, not only once.
    So should i repeat steps for first finded to next finded?

    Jacek

  16. #16
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: How to find all #N/A in workbook?

    Ok Guys,

    problem fixed.

    Jacek

+ 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. Replies: 3
    Last Post: 01-15-2019, 03:58 AM
  2. Replies: 0
    Last Post: 09-22-2018, 04:10 AM
  3. Open 2nd workbook find matching worksheet names and copy values to 1st workbook
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-09-2017, 10:22 AM
  4. [SOLVED] Macro to find data in source workbook and copy paste to target workbook
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-23-2014, 06:21 AM
  5. Find workbook name and combine that workbook into exisiting worksheet column
    By ghladik in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 02:23 PM
  6. find a formula to autopopulate one workbook sheet to another workbook
    By Aleaghh00 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-06-2013, 03:43 PM
  7. [SOLVED] Find and open workbook.xls from cell A1 and search for value from A2 in that workbook
    By ANDREWA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2012, 07:50 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