+ Reply to Thread
Results 1 to 7 of 7

Formula to return #NA if referenced cell is blank/0

  1. #1
    Registered User
    Join Date
    01-22-2015
    Location
    England
    MS-Off Ver
    Microsoft Office 365
    Posts
    92

    Formula to return #NA if referenced cell is blank/0

    Hi all.

    I am referencing cells taken from a pivot table. So for example, cell A2 will have a value of 100 (in the pivot table) and cell B2 will have the formula =(A2). So B2 will always return whatever value is in cell A2.

    I am looking for a formula that will return #NA for a referenced cell that is blank or has 0.

    Can anyone help?

    Thanks,

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

    Re: Formula to return #NA if referenced cell is blank/0

    Perhaps =IF(or(a1=0,a1=""),"N/A",a1)
    Last edited by Pepe Le Mokko; 05-28-2015 at 09:36 AM.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to return #NA if referenced cell is blank/0

    Try

    =IF(A2=0,"#NA",A2)

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,084

    Re: Formula to return #NA if referenced cell is blank/0

    =if(or(A2="",A2=0),NA(),A2) should do it.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  5. #5
    Registered User
    Join Date
    01-22-2015
    Location
    England
    MS-Off Ver
    Microsoft Office 365
    Posts
    92

    Re: Formula to return #NA if referenced cell is blank/0

    Thank you all.

    They worked perfect!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,084

    Re: Formula to return #NA if referenced cell is blank/0

    Glad to have helped! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to return #NA if referenced cell is blank/0

    You're welcome.

+ 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] Cell referenced in formula has no information displayed (shows blank), return blank cell
    By nunayobinezz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2013, 04:51 PM
  2. function CELL() to return the formula in the referenced cell
    By Streep in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  3. function CELL() to return the formula in the referenced cell
    By Streep in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  4. function CELL() to return the formula in the referenced cell
    By Streep in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] function CELL() to return the formula in the referenced cell
    By Streep in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2005, 06:05 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