+ Reply to Thread
Results 1 to 5 of 5

How can I make my IF/OR formula work?

  1. #1
    Registered User
    Join Date
    11-25-2014
    Location
    Isle of Man
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    82

    How can I make my IF/OR formula work?

    I'm not sure why this formula isn't working..it's probably just a simple mistake; I've been tinkering with it for half an hour now and I don't understand what's wrong.

    I'm trying to write a formula which will check if the value in cell B1 or D1 is #N/A or 0 and if so, write 'DELETE.'

    Example of how it should look if working:

    A B C D E
    Name1 21 USD 04/12/2015
    Name2 #N/A EUR #N/A DELETE
    Name3 1.29 USD 24/05/2015
    Name4 0 GBP 01/01/2014 DELETE
    Name5 1009 CHF 0 DELETE
    The formula I'm currently using is:
    =IF(OR(B1="N/A",D1="#N/A",B1=0,D1=0),"DELETE","")

    This works if the cell contains a 0, it will indeed populate with: DELETE. But the #N/A part is just returning #N/A rather than: DELETE. Does anyone know how to fix this? I've tried using the ISNA formula but I can't get this to work either.

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,362

    Re: How can I make my IF/OR formula work?

    Is #N/A the result of a formula? If so get rid of the #N/A

    use

    =IFERROR(formula,0)

    You can just check for zero

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,814

    Re: How can I make my IF/OR formula work?

    You need to check for the errors first. Try it like this:

    =IF(OR(ISNA(B1),ISNA(D1)),"DELETE",IF(OR(B1=0,D1=0),"DELETE",""))

    Hope this helps.

    Pete

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: How can I make my IF/OR formula work?

    Try the following:

    =IF(OR(ISNA(B1),ISNA(D1),B1=0,D1=0),"DELETE","")

  5. #5
    Registered User
    Join Date
    11-25-2014
    Location
    Isle of Man
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    82

    Re: How can I make my IF/OR formula work?

    Many thanks for suggestions! I tested Pete's formula and this seems to work. I'd tried something similar but hadn't check for the errors first using ISNA and then the 0's. Thank you!

+ 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 make this work as one formula
    By mrsexson in forum Excel General
    Replies: 2
    Last Post: 07-16-2015, 04:07 PM
  2. [SOLVED] have Another Formula that i cant figure out how to make work..
    By bUB9161 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-16-2015, 02:50 AM
  3. [SOLVED] Help make IF formula only work if a particular cell is <50
    By tlacloche in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-07-2014, 11:04 AM
  4. [SOLVED] nested if formula that i cant sem to make work
    By fordtough68 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2013, 11:44 AM
  5. How do I make this formula work?
    By Eladamri in forum Excel General
    Replies: 1
    Last Post: 09-08-2006, 02:23 AM
  6. FORMULA FOR EXPERT, PLS MAKE THIS WORK
    By Moh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2006, 10:10 AM
  7. RE: FORMULA FOR EXPERT, PLS MAKE THIS WORK
    By Blue Aardvark in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2006, 01:30 PM

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