+ Reply to Thread
Results 1 to 8 of 8

Help with IF formula

  1. #1
    Registered User
    Join Date
    09-25-2016
    Location
    UK
    MS-Off Ver
    Excel
    Posts
    3

    Help with IF formula

    Hi,

    looking for some help with a formula, I currently have the following:

    =IF((AND( G3="Home", K3<-7)), "Road", IF((AND(G3="Home", K3>10)), "Home", IF((AND(G3="Road", K3<-3)), "Road", IF((AND(G3=Road, K3<14)), "Home"))))

    No this works and gives me the results I want, however I want to have the text "None" if none of the criteria are met, value if false is you will. Can anyone help?

    Thanks
    David

  2. #2
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2019 H: 365
    Posts
    940

    Re: Help with IF formula

    Hi Dave1812,

    Try this:

    =IF(AND(G3="Home",K3<-7),"Road",IF(AND(G3="Home",K3>10),"Home",IF(AND(G3="Road", K3<-3),"Road",IF(AND(G3="Road", K3<14),"Home","None"))))
    Last edited by The_Snook; 09-25-2016 at 02:14 PM. Reason: Tweaked formula.

  3. #3
    Registered User
    Join Date
    09-25-2016
    Location
    UK
    MS-Off Ver
    Excel
    Posts
    3

    Re: Help with IF formula

    Thanks Snook, but get the same error #NAME? when criteria not met.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help with IF formula

    =IF(AND(G3="Home",K3<-7),"Road",IF(AND(G3="Home",K3>10),"Home",IF(AND(G3="Road", K3<-3),"Road",IF(AND(G3=Road,K3<14),"Home","None"))))
    The last instance of Road should be quoted. "Road"
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2019 H: 365
    Posts
    940

    Re: Help with IF formula

    Good spot Tony!

    I've amended my formula.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help with IF formula





    -----------

  7. #7
    Registered User
    Join Date
    09-25-2016
    Location
    UK
    MS-Off Ver
    Excel
    Posts
    3

    Re: Help with IF formula

    Thanks both.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help with IF formula

    You're welcome!

+ 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: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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