+ Reply to Thread
Results 1 to 7 of 7

If / or issue on complicated formula

  1. #1
    Registered User
    Join Date
    02-17-2018
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    8

    If / or issue on complicated formula

    I think this is the final formula issue I have with the complex worksheet I have been working on. The formula's below are a little complex and may be hard to follow, but I believe I'm just missing some syntax on my new if/or varaiable.

    I have a formula that works fine =IF(AND(I$1>=Staff!$N10,OR(I$1 <= Staff!$O10,ISBLANK(Staff!$O10))),Staff!$H10 * Setup!$C$24 * I$2,0)

    Now I have to add another data qualifier (or whatever it's called), so that if cell c10 has a value of "CAFS" in it, I need to change one number in the formula so that the new formula would be:
    =IF(AND(I$1>=Staff!$N10,OR(I$1 <= Staff!$O10,ISBLANK(Staff!$O10))),Staff!$H10 * Setup!$C$24 * I$3,0)

    If the value in c3 is something other than "CAFS", then I need to keep the original formula =IF(AND(I$1>=Staff!$N10,OR(I$1 <= Staff!$O10,ISBLANK(Staff!$O10))),Staff!$H10 * Setup!$C$24 * I$2,0)

    So the only difference in the two formulas is which row is used on the last part of the equation (in the first case row "3" and in the second case row "2").

    The formula I came up with is: =IF($C6="CAFS",IF(AND(I$1>=Staff!$N6,OR(I$1<=Staff!$O6,ISBLANK(Staff!$O6))),Staff!$H6*Setup!$C$24*I$3,IF(AND(I$1>=Staff!$N6,OR(I$1<=Staff!$O6,ISBLANK(Staff!$O6))),Staff!$H6*Setup!$C$24*I$2,0)))

    ...which seems to work fine if C6 does = "CAFS", however if there is something else in C6, it isn't running the alternate formula...but is rather just giving a "False" message. Based on this result, I am assuming that I am missing something that is causing the OR formula to get missed, but I can't track down where the issue is.

    Any thoughts would be greatly appreciated!

    Thanks,
    Bill

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: If / or issue on complicated formula

    Try Formulas -> Evaluate Formula to give you a clue.

    Also rather than leave all the FALSE indicators in your formula blank, put some unique text in there to help find the IF where it is failing, ie. instead of ))) put ),"False1"),"False2")

  3. #3
    Registered User
    Join Date
    02-17-2018
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    8

    Re: If / or issue on complicated formula

    Thanks for your reply Kersplash. Entering the "False1" and "False2" that you mentioned, just gives me the error "You've entered too many arguments for this function". The "Evaluate Formula" option runs through correctly if C6 is CAFS (which is the first variable to check), however if C6 is something other than CAFS, the evaluation just returns False...which I'm assuming means that the formula is simple stopping after getting the false response to the first validation, rather than executing the formula it should. This still raises the question of what I am doing wrong,with the if or statement....

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: If / or issue on complicated formula

    Formulas -> Evaluate Formula may help you.

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: If / or issue on complicated formula

    Try :
    Please Login or Register  to view this content.
    If used mathematically, TRUE =1, FALSE =0.
    Last edited by leelnich; 02-19-2018 at 10:38 PM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  6. #6
    Registered User
    Join Date
    02-17-2018
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    8

    Re: If / or issue on complicated formula

    Hi Leelnich. Thank you so much for your response. It looks like the formula that you suggested is doing what I need it to do...although I'm not smart enough to know why it is... I'm not experienced with the Index command, so so I'm not exactly sure what it is doing...but like I said...it's doing what I need it to do

  7. #7
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: If / or issue on complicated formula

    INDEX lets you address a particular cell, row, or column within a larger range. Here's a link:
    https://exceljet.net/excel-functions...index-function

    An alternative using IF instead:
    Please Login or Register  to view this content.
    If concluded, please mark your thread as SOLVED (Thread Tools above post #1). And since you're new...
    Clicking the Add Reputation star below helpful posts is a nice way to show appreciation to those who contributed. Regards - Lee
    Last edited by leelnich; 02-21-2018 at 02:21 AM.

+ 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. Having an issue with how to write a slightly complicated SUMIF formula
    By SallyBV in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2017, 08:45 AM
  2. [SOLVED] I have a complicated sorting issue
    By thedunna in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-14-2016, 01:39 PM
  3. Complicated If Formula Issue
    By GotQuestions in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2013, 11:30 AM
  4. Complicated Referencing Issue
    By AdHutch in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-01-2013, 05:54 AM
  5. Complicated duplicate issue
    By furface00 in forum Excel General
    Replies: 3
    Last Post: 02-21-2012, 04:37 PM
  6. Complicated Logical Formula issue
    By Landtuber in forum Excel General
    Replies: 4
    Last Post: 05-05-2010, 12:29 AM
  7. Complicated Duplicate Issue
    By roasty_1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-02-2008, 05:52 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