+ Reply to Thread
Results 1 to 2 of 2

Can't figure out why combo of IF,AND,OR,COUNTIF statements in formula isn't working

  1. #1
    Registered User
    Join Date
    02-26-2019
    Location
    Dallas, Texas
    MS-Off Ver
    2016
    Posts
    1

    Can't figure out why combo of IF,AND,OR,COUNTIF statements in formula isn't working

    I wrote a simple formula in column H that checks if the Item# in col. A is on a sheet named SharePoint. If it's not, the cell will say 'Add to SP.'

    Please Login or Register  to view this content.
    But what I really want is for the cell to say this only if sheet SharePoint doesn't haven the Item# AND columns D or F say one of the phrases in the OR statement below. I added a combination of AND and OR statements to the above formula to accomplish this. This formula is in column I.
    Please Login or Register  to view this content.
    8ktlx.png
    These are a couple of test cases. Neither item# is in sheet SharePoint (which the simple formula in col. H correctly diagnoses), AND they have one of the phrases in the OR statement. So column I should say Add to SP, but the formula just returns a #N/A error.

    I had found a syntax error that I thought was causing the problem and fixed it, but I still get an error. I have also messed around with the order/placement of the AND and OR statements, but no success - and, I feel like the current order I have my formula in makes logical sense. What might the problem be? There must be something wrong with the logic of the formula...

    I would also like to introduce myself. This is my first time posting on this site. I currently work in supply chain and work with large excel spreadsheets all day, every day. Up until now I've been using StackExchange since that's what a colleague of mine recommended, but I came across excelforum today and I am excited (I feel like the Excel part of StackExchange gets neglected).
    Last edited by forlorn; 02-26-2019 at 06:22 PM.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Can't figure out why combo of IF,AND,OR,COUNTIF statements in formula isn't working

    F2 is a #N/A error so as soon as your formula tries to compare it to "Supplier late" it causes an error and that's what the formula returns. You'd need something like:

    =IF(AND(COUNTIF(SharePoint!N:N,A2)=0,OR(D2={"Transferred","Needs Validation","No PPAP Required","Closed W/O Approval"},IFERROR(F2,"")="Supplier Late")),"Add to SP","")
    Rory

+ 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] VBA code not working for Autofill combo box, If I use INDIRECT formula
    By rajeshn_in in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2016, 02:23 AM
  2. [SOLVED] Can't figure out why my SUMIFS formula is not working!
    By mattsonberg in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-25-2014, 02:28 PM
  3. I screwed up a formula which was working fine and cannot figure it out!!!
    By boomtown25 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2014, 10:52 AM
  4. [SOLVED] Sum multiple COUNTIF statements in a single formula
    By bfs3 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-17-2014, 10:24 PM
  5. Replies: 2
    Last Post: 06-05-2013, 01:14 PM
  6. Sum formula to exclude monthly budget figure when actual figure is entered
    By rocketmail in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2013, 04:22 AM
  7. Replies: 2
    Last Post: 01-11-2010, 07:37 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