+ Reply to Thread
Results 1 to 4 of 4

Is it possible to highlight a cell that caused an IF function to fail?

  1. #1
    Registered User
    Join Date
    06-11-2019
    Location
    United States
    MS-Off Ver
    Office 365?
    Posts
    6

    Is it possible to highlight a cell that caused an IF function to fail?

    I have a pretty long if function that returns checks multiple fields for specific values. I would like to format the cells that cause the If function to fail to fill with red color. I do not want to highlight the actual "true","false" returns. I need to know what specific field or multiple fields that caused the function to fail. Is this possible?

    **I'm working in pivot tables.

    My current function:

    =IF(Query[Material Type]="GF" && Query[MRPController]>"699" && Query[MRPController]<"800" && Query[ProcurementType]="E" && Query[LotSize] in {"ZE","EX","ZM","ZX"} && Query[DefaultStorLocExtlProc]="1008" && Query[IssueStorageLocation]="1008" && Query[StrategyGroup] in {"40","Z2"} && Query[PeriodIndic]="W" ,"","Error")

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Is it possible to highlight a cell that caused an IF function to fail?

    I recommend uploading a small representative sample of your data along with the desired results (which you can enter manually) based on that data.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Is it possible to highlight a cell that caused an IF function to fail?

    wasn't this mentioned in your earlier post here https://www.excelforum.com/excel-for...ml#post5136548
    Part of the issue is you cannot have a greater than 699 when 699 is text and 699 is text when you put quotes around it. That is like saying something is greater than "dog".
    And what is the && for? Is that supposed to be that if the first item = "GF" and the second item is greater than "699"? You should write that as something like =IF(AND(Query[Material Type]="GF",Query[MRPController]>699 etc...
    Hope that helps.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    06-11-2019
    Location
    United States
    MS-Off Ver
    Office 365?
    Posts
    6

    Re: Is it possible to highlight a cell that caused an IF function to fail?

    The <> "699" is working as intended. The && is an And operator within DAX (power pivot). The function is working fine.
    All I want to know is how to Color fill the specific cells that trip the formula and result in a false or "Error"

+ 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 a cell display "FAIL" when range of cells is FAIL
    By crazychile in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2017, 04:13 PM
  2. Can VBA reference change in cell value caused by formula?
    By gabbana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2016, 11:44 AM
  3. Replies: 4
    Last Post: 04-12-2015, 02:47 AM
  4. [SOLVED] Need a formula for pass/fail based on no. of Y answers but automatically fail if 3a is N
    By Researcher1111 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-15-2013, 10:20 PM
  5. [SOLVED] IFERROR function with Hour function Fail
    By Kram222 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-24-2012, 12:25 AM
  6. Function address 0x7c9369da caused a protection fault
    By bigv7773 in forum Excel General
    Replies: 1
    Last Post: 06-27-2009, 07:18 PM
  7. Function address 0x7c9369da caused a protection fault
    By bigv7773 in forum Excel General
    Replies: 1
    Last Post: 06-23-2009, 02:16 AM

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