+ Reply to Thread
Results 1 to 7 of 7

formula involve with if and #n/a

  1. #1
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    formula involve with if and #n/a

    I have three column of data.

    One example: 2500, #n/a, #n/a (say a1,b1,c1)

    I am using 'if' formula when any of the data consist of number not #n/a it would result of 0.

    My formula is =if(or(a1>0,b1>0,c1>0),0,#n/a) and it show #n/a.

    When I separate the formula is ok. =if(a1>0,0,#n/a) shows 0 and the other two show #n/a.

    Any idea what went wrong?

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

    Re: formula involve with if and #n/a

    Maybe this...

    =IF(COUNT(A1:C1),0,#N/A)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: formula involve with if and #n/a

    hi david. the reason is because the formula comes to a halt when it encounters error. your logical tests for each of them are supposed to return TRUE or FALSE
    A1>0
    B1>0
    C1>0

    for eg. if you select this part in the formula A1>0 & press F9 to calculate, it shows you TRUE

    but if you select B1>0 & press F9, it becomes #N/A and not FALSE. once it has an error, your results become an error.

    so you have to use some formulas that can ignore the error & give you a non-error/TRUE/FALSE like Tony's COUNT. COUNT will tell you how many numbers are in A1:C1. if it's 1 or more, it returns 0. otherwise, it returns #N/A

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: formula involve with if and #n/a

    Quote Originally Posted by Tony Valko View Post
    Maybe this...

    =IF(COUNT(A1:C1),0,#N/A)
    Thanks you. It's work.

  5. #5
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: formula involve with if and #n/a

    hi benishiryo,

    thank you for the explanation. it's important to me not only what work but how it works.

  6. #6
    Forum Contributor
    Join Date
    11-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007,2013
    Posts
    159

    Re: formula involve with if and #n/a

    Hi,

    An alternative.

    =IF(AND(ISERROR(A1),ISERROR(B1),ISERROR(C1)),"#NA",0)

    This will works even a cell has no value/figure.

    Last edited by reimar_rem; 12-21-2013 at 12:10 AM.
    Click * below if this answer helped

  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: formula involve with if and #n/a

    You're welcome. Thanks for the feedback!

    If your question has been answered please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools>Mark this thread as solved.

+ 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. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM
  2. [SOLVED] Nested IF statements that involve #N/A errors from vlookups
    By CorporateBatteryHen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-02-2013, 02:03 AM
  3. Replies: 2
    Last Post: 03-07-2013, 01:47 PM
  4. involve a third party application
    By hqradio in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-22-2011, 01:18 AM

Tags for this Thread

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