+ Reply to Thread
Results 1 to 3 of 3

Force #N/A to 0

  1. #1
    Registered User
    Join Date
    12-15-2004
    Posts
    64

    Force #N/A to 0

    I have a formula which use IF and VLOOKUP that refers to a linked worksheet and depending on the data in the linked worksheet will return a value or #N/A because the VLOOKUP value is not present in the linked worksheet.

    I am trying to get the formula to return a 0 rather than N/A when the LOOKUP value is not present in the linked worksheet

    =IF(A24="","0",(VLOOKUP(A24,'Y:\Steve\Planning\MSP''S\RED MRP\[RED MRPS JAN.xls]2005'!$1:$65536,27,FALSE)))*(VLOOKUP(A24,Costing,11,FALSE))

    As you can see if the value A24 is not present in

    'Y:\Steve\Planning\MSP''S\RED MRP\[RED MRPS JAN.xls]2005'

    Then #N/A is returned and I need it to return a 0

    Any help would be appreciated.

  2. #2
    Forum Contributor
    Join Date
    11-16-2004
    Posts
    282
    Sandy,

    Try this:

    =IF(ISERROR(VLOOKUP(A24,'Y:\Steve\Planning\MSP''S\RED MRP\[RED MRPS JAN.xls]2005'!$1:$65536,27,FALSE)), 0, VLOOKUP(A24,'Y:\Steve\Planning\MSP''S\RED MRP\[RED MRPS JAN.xls]2005'!$1:$65536,27,FALSE)) * (VLOOKUP(A24,Costing,11,FALSE))

    Hope this helps,
    theDude

  3. #3
    Registered User
    Join Date
    12-15-2004
    Posts
    64

    Thank you

    Thanks a lot

    I tried something similar =IF(ISNA(YourFormula),0,YourFormula)

    Though i can see the advantage of your way i.e. that it will enter a 0 for all errors.

    The only problem i have now is that the formula is getting very long and i need to update the file path to the relevant data worksheet on a weekly basis for a large amount of rows. I tried copying the file path into a cell on another sheet within my workbook and then copying this cell into the formula e.g.

    =IF(ISNA(VLOOKUP(A23,Data!$B$6,27,FALSE))*(VLOOKUP(A23,Costing,11,FALSE)),0,VLOOKUP(A23,Data!$B$6,27,FALSE))*(VLOOKUP(A23,Costing,11,FALSE)))

    Where Data!$B$6 contains the file path to the workbook with the data but i am not achieving any success.

    I am going to post this as a question but thought i would let you know i am achieveing some success and thank you for the help.

+ 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