+ Reply to Thread
Results 1 to 7 of 7

Unable to identify formula error

  1. #1
    Registered User
    Join Date
    04-08-2016
    Location
    Santa Monica, California
    MS-Off Ver
    2011
    Posts
    3

    Unable to identify formula error

    Hello! I am working on an IF statement with some AND and OR functions nested inside. I keep getting the generic notification that there is an error in my formula, but I can't seem to find it anywhere.

    IF(OR(AND(K25="$15k-$50k",OR(M25="Location 1",M25="Location 2”)),AND(K25="$15k-$50k",O25="<1 week”, OR(M25="Location 3",M25="Location 4”)),"Option 1",0)

    What I'm trying to achieve is:

    Print "Option 1" IF:
    Either:
    K25 = "$15k-$50k" AND M25 is either "Location 1" OR "Location 2"
    OR
    K25 = "$15k-$50k" AND O25="<1 week” AND M25 is either "Location 3" OR "Location 4"

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Unable to identify formula error

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Unable to identify formula error

    You had a couple of odd double quotes (after "Location 2" for example) in there, along with a missing closing parenthesis for the first OR function.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-08-2016
    Location
    Santa Monica, California
    MS-Off Ver
    2011
    Posts
    3

    Re: Unable to identify formula error

    Thanks Olly and EchoPassenger! That worked in isolation. Now the deal is that I'm wanting to append that formula to another formula. Both formulas work in isolation, but when combining them, I receive an error that I've entered too many arguments for the formula.

    The whole formula is as follows:

    =IF(AND(OR(K25="$5k-$15k",K25="$3k-$5k"),M25="Location 1"),"Option 1",IF(AND(OR(K25="$5k-$15k",K25="$3k-$5k"),OR(M25="Location 2",M25="Location 3",M25="Location 4")),"Option 2"),IF(OR(AND(K25="$15k-$50k",OR(M25="Location 1",M25="Location 2")),AND(K25="$15k-$50k",O25="<1 week", OR(M25="Location 3",M25="Location 4"))),"Option 1",0))

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Unable to identify formula error

    I believe the problem is the closing of the parentheses after "Option 2", if that is removed and another is added at the very end of the formula, after "Option 1",0)) I beleive it will work.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    04-08-2016
    Location
    Santa Monica, California
    MS-Off Ver
    2011
    Posts
    3

    Re: Unable to identify formula error

    JeteMc, you're awesome. That did the trick.

    Thank you!

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Unable to identify formula error

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. Replies: 3
    Last Post: 07-29-2016, 09:34 AM
  2. [SOLVED] Error on very long formula that I can't identify
    By Groovicles in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-19-2015, 09:47 AM
  3. long formula to vba macro - error 1004 unable to set formulaarray property
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2013, 06:18 AM
  4. [SOLVED] Unable to solve error with FIND formula
    By dcp359 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-27-2013, 02:37 PM
  5. 1004 Error due to nasty server - unable to error handle
    By PuppyOnTheRadio in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2013, 06:39 AM
  6. Unable to Identify Error in Formula
    By questers in forum Excel General
    Replies: 4
    Last Post: 07-03-2010, 03:02 PM
  7. Unable to record error, long formula macro problems
    By Jerhansen277 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2008, 06:22 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