+ Reply to Thread
Results 1 to 6 of 6

If no matches formula displays #N/A

  1. #1
    Forum Contributor
    Join Date
    09-13-2005
    Posts
    114

    If no matches formula displays #N/A

    I'm currently using this formula:

    {=INDEX('Data Dump - #001'!$L$1:$L$10000,MATCH(1,('Data Dump - #001'!$H$1:$H$10000=$A8)*('Data Dump - #001'!$J$1:$J$10000=$B8)*('Data Dump - #001'!$A$1:$A$10000=$Q8)*('Data Dump - #001'!$C$1:$C$10000=$R8),0))}

    What it does is looks to find a match for 4 different criteria:

    ('Data Dump - #001'!$H$1:$H$10000=$A8)*('Data Dump - #001'!$J$1:$J$10000=$B8)*('Data Dump - #001'!$A$1:$A$10000=$Q8)*('Data Dump - #001'!$C$1:$C$10000=$R8)

    If it finds a match it then looks in the same row in column L of the Data Dump sheet and displays the number in that cell. My problem is that if there is no match excel comes back with a value of #N/A. This is a problem because I then have a sum formula adding all the values the formula finds but since there are some #N/A values the SUM formula doesn't work.

    What I'm trying to figure out is if there is either a way to alter my SUM formula to ignore the #N/A values or if there's a way to change my initial formula so that if it doesn't find a match it just displays a value of 0. Thanks in advance for any help.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    To sum avoiding the #N/A error....

    =SUMIF(A1:A100,"<>#N/A")

    adjust range to suit.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    11-23-2007
    Location
    Suffolk, UK
    Posts
    298
    hi weasel,

    if you use

    Please Login or Register  to view this content.
    then CTRL+SHIFT & ENTER

    on any error the formula will place a 0 rather than an #N/A and drag down as necessary

    thanks reg

  4. #4
    Forum Contributor
    Join Date
    09-13-2005
    Posts
    114
    Thanks for the help

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    It would be thoughtful to explain which solution you chose and why ...

  6. #6
    Forum Contributor
    Join Date
    09-13-2005
    Posts
    114
    I went with the second solution since it changed all of the values in my spreadsheet that had #N/A to 0. It made the report much cleaner to look at

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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