+ Reply to Thread
Results 1 to 7 of 7

Return first found error adress in range A1 to D500?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    127

    Return first found error adress in range A1 to D500?

    I've used some search and some index +- match. But getting this work is beyond me.

    If i have errors in A22, B13 and D1 i need to be able to find them via 1 formula (i know i can only track one at a time with this approach) - my document requires me to fix them so getting 1 address, resolving it and moving to the next one is good enough.

    Otherwise i have to dedicate a search formula to each column, and i got like 200 of em.

    Epic solve by Tony Valko below:

    Search tags:
    Find results in array.
    Find error in array.
    Find result in multiple rows and columns.
    Search address in array.
    Last edited by Polymorpher; 09-28-2015 at 08:23 AM. Reason: Solved

  2. #2
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Return first found error adress in range A1 to D500?

    Hiii please find attached sheet...

    It is not final solution... but check it..

    In following code error handler is pending and also #N/A error yet to cover

    Sub celladrss()
        Dim x As String
        Range("A1").Select
        With Cells
            .Find(What:="#VALUE!", After:=ActiveCell, LookIn:=xlValues, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
            False, SearchFormat:=False).Activate
            x = ActiveCell.Address
        End With
        Sheets("First found").Select
        Range("A1").Value = x
    End Sub
    Attached Files Attached Files
    Don`t care, take care...

    Regards,
    Mangesh

  3. #3
    Forum Contributor
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    127

    Re: Return first found error adress in range A1 to D500?

    Yeah, I'm waiting for the pros to give their judgment if it could be done without VBA.
    Otherwise formulating it isn't hard since you are currently only checking for #VALUE!. substituting the explicit text search with IF(ISERROR(true)) should cover it.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return first found error adress in range A1 to D500?

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    #N/A
    99
    31
    #VALUE!
    A1
    2
    53
    #NULL!
    49
    25
    B2
    3
    6
    10
    #NAME?
    44
    C3
    4
    90
    92
    47
    #NUM!
    D1
    5
    60
    20
    75
    32
    D4
    6
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F1:

    =IFERROR(ADDRESS(MOD(SMALL(IF(ISERROR($A$1:$D$5),COLUMN($A$1:$D$5)*10000+ROW($A$1:$D$5)),ROWS(F$1:F1)),10000),TRUNC(SMALL(IF(ISERROR($A$1:$D$5),COLUMN($A$1:$D$5)*10000+ROW($A$1:$D$5)),ROWS(F$1:F1))/10000),4),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Return first found error adress in range A1 to D500?

    okay... but If you dont want a Macro then I think it is possible with User defined function(i.e. UDF) using loops..

  6. #6
    Forum Contributor
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    127

    Re: Return first found error adress in range A1 to D500?

    Hoooly ****... No wonder I couldn't do it - its looks like an excerpt from the third tome "Mysteries of the Excel Grandmasters".

    Yeah it works. And there is handy way of using it. Just bind the result to a HYPERLINK function and you can jump to each next on demand. (Especially if you have a frozen view top row with such navigation gimmicks)

    Also I suggest replacing the end "") with "some text") so the formula doesn't get lost from view when you don't have errors.

    ......
    And for the others uninitiated like me:

    Use his wizardry somewhere in a cell say A1, then point a =HYPERLINK(CONCATENATE("#",A1),"Name of how you see the link")
    I refrain from nesting stuff in hyperlinks cuz its weird sometimes.

    the # basically tells the hyperlink to link in the document and sheet its in (i think), because it doesn't work if you drop the # and just tell it to go to "A1".

    In case you don't know how to enter the hyperlink functions either navigate to it and F2 or hold the leftclick longer so you stay in position instead of getting redirected.
    Last edited by Polymorpher; 09-28-2015 at 08:09 AM.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return first found error adress in range A1 to D500?

    Thanks for the rep and feedback!

+ 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] return an error if not found, or a message
    By freshfruit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2014, 02:17 PM
  2. [SOLVED] Return cell reference of a found value in a range
    By dysert in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-11-2013, 08:15 PM
  3. Return cell adress
    By joodkap in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-15-2010, 01:12 AM
  4. Error: No RETURN() or HALT() function found on macro sheet
    By chisala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2009, 05:00 AM
  5. Return cell adress for next non-blank cell in a range
    By toreadore in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-28-2006, 07:40 AM
  6. [SOLVED] Return ROW number from qa found range
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2006, 09:55 AM
  7. Return ROW value for range found
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-26-2006, 09:40 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