+ Reply to Thread
Results 1 to 7 of 7

IF(AND formula help

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    63

    IF(AND formula help

    How do I write an IF(AND formula where if B1 is between 0.5 and -2.4, and D1 is between -0.7 and -4.5, then "1", "")

    I know its a simple formula but every time I try it, i keep missing something. Thanks.

  2. #2
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: IF(AND formula help

    Try like this

    Please Login or Register  to view this content.
    Regards
    Mark the thread as solved if you are satisfied with the answer.


    In your first post under the thread tools.

    Mahju

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: IF(AND formula help

    =if(and(b1>=-2.4,b1<=0.5,d1>=-4.5,d1<=-0.7),"1", "")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  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: IF(AND formula help

    Quote Originally Posted by nflsales View Post
    =if(and(b1>=-2.4,b1<=0.5,d1>=-4.5,d1<=-0.7),"1", "")
    Probably a good idea to not quote the number 1.

    =IF(AND(B1>=-2.4,B1<=0.5,D1>=-4.5,D1<=-0.7),1,"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: IF(AND formula help

    yaa you r right "Tony Valko, usually I don't do it, here I copied from the OPs post and edited

  6. #6
    Registered User
    Join Date
    11-15-2012
    Location
    Tampa
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    63

    Re: IF(AND formula help

    Got it. Thanks everybody!

  7. #7
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: IF(AND formula help

    Hi All,

    Here is a different approach!

    =AND(B1=MEDIAN(B1,0.5,-2.4),D1=MEDIAN(D1,-0.7,-4.5))*1

    I picked this up on Chandoo website a few years ago and thought it quite clever.

    I hope this helps, please let me know!

    Regards,

    David

    Please remember, your request is clearer if you attach a sample workbook.
    - Click on Go Advanced and click on the Paper Clip.

    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

    If several people have responded, when you reply please make it clear WHO you are responding
    to by mentioning their name.

+ 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