+ Reply to Thread
Results 1 to 4 of 4

If/and

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    If/and

    I'm trying to use multiple if and and statements in excel. However, every time I try to do this, I get an error message. I'm just not sure what I'm doing wrong so I figured I'd ask. Basically, I want excel to recognize the highest of 3 numbers (they are NPV values) and make a recommendation on what to do based on which one is the largest number. So:

    If cell D11>D20 and D11>D30 then I want it to say "rent machine".
    If cell D20>D11 and D20>D30 then I want it to say "purchase current machine"
    If cell D30>D11 and D30>D20 then I want it to say "purchase newer machine"

    The way that I tried doing this was a series of IF and AND statements but it isn't working out. If anyone could help me figure out how to formulate this I'd really appreciate it.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Please help with IF/AND statements

    hmm.... without a spreadsheet before me, I'd say

    =IF(AND(D11>D20,D11>D30),"rent machine",IF(AND(D20>D11,D20>D30),"purchase current machine",IF(AND(D30>D11,D30>D20),"purchase newer machine","can't decide")))

  3. #3
    Registered User
    Join Date
    10-21-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Please help with IF/AND statements

    Thanks. After all that I think I just left out a comma. Amazing how a tiny thing like that makes a world of difference.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Please help with IF/AND statements

    After all that I think I just left out a comma
    The devil is in the detail!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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