+ Reply to Thread
Results 1 to 6 of 6

Next if(and statement

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Next if(and statement

    Hi guys,

    Here's what I'm trying to do:

    If A1>B1 and A1>C1, then D1="High"
    If B1>A1 and B1>C1, then D1="Medium"
    If C1>A1 and C1>B1, then D1="Low"

    Can't seem to figure this one out. Any suggestions?

    Thanks!!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,878

    Re: Next if(and statement

    I think this will work pasted into D1:
    =IF(A1=LARGE(A1:C1,1),"High",IF(B1=LARGE(A1:C1,1),"Medium","Low"))

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Next if(and statement

    Or this

    =IF(AND(A1>B1,A1>C1),"High",IF(AND(B1>A1,B1>C1),"Medium",IF(AND(C1>A1,C1>B1),"Low","")))

    or

    =IF(A1=MAX(A1:C1),"High",IF(B1=MAX(A1:C1),"Medium","Low"))
    Last edited by AlKey; 02-18-2014 at 02:29 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Next if(and statement

    Thanks very much AlKey!

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Next if(and statement

    You're welcome and thank you for your feedback!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,878

    Re: Next if(and statement

    Not Alkey, but thank you for the reputation points.

+ 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. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  2. [SOLVED] Combining If Statement, Is Blank Statement and HLookUp
    By kimberlyre2000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-29-2012, 01:27 PM
  3. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  4. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  5. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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