+ Reply to Thread
Results 1 to 5 of 5

IF Statements

  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Guelph, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    IF Statements

    Hi All,
    I was directed to this forum as I have an Excel problem. I love Excel and will most definitely make use of this Forum while hopefully helping others. My problem is this...too many arguments for IF statements. This is what I want to do. Hopefully I am sending it correctly:
    If <214.99 but >210 = 210 and If<219.99 but >215 = 215 and If<224.99 but >220 = 220 and If <229.99 but >225 = 225 and If<234.99 but >230 = 230.
    Thanking in advance yet will thank again.

    Glen
    Last edited by Brydgy; 03-15-2011 at 09:19 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: IF Statements

    Maybe, one way, assuming the value is in cell A2:

    =IF(A2<210,"",IF(A2<215,210,IF(A2<220,215,IF(A2<225,220,IF(A2<230,225,IF(A2<235,230,""))))))

    as you don't say what you want outside the extremes, I've opted for blanks.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: IF Statements

    Hi Glen and welcome to the forum,

    Vlookup will work for you if you use the Approximate Match. That would be having the last argument True.

    Find the attached with the answer.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: IF Statements

    Another option:

    =HLOOKUP(C5,{0,210,215,220,225,230,235},1,TRUE)

    assuming the value is in cell C5

    Regards

  5. #5
    Registered User
    Join Date
    03-15-2011
    Location
    Guelph, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: IF Statements

    Quote Originally Posted by MarvinP View Post
    Hi Glen and welcome to the forum,

    Vlookup will work for you if you use the Approximate Match. That would be having the last argument True.

    Find the attached with the answer.
    Hi Marvin,
    Thanks for the welcome and for aiding me in my quest. I tried your response and it worked like a dream. I will try the others at a later date. Thanks to all who responded.

    Glen

+ 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