+ Reply to Thread
Results 1 to 8 of 8

Multiple If Statements with <>=

  1. #1
    Registered User
    Join Date
    04-24-2007
    Posts
    32

    Multiple If Statements with <>=

    Hi,

    I currently have a small function that works ok =IF(F2>=30,10,IF(F2<12,0,4)) This displays a number of 10, 4 or 0 depending upon the contents of cell F2.

    However I need to increase the arguments so that the following are shown.

    IF F2 greater than 39 then display 10
    IF F2 less than 40 but greater than 29 then display 8
    IF F2 less than 30 but greater than 19 then display 5
    IF F2 less than 20 but greater than 12 then display 3
    IF F2 less than 13 then display 0

    Please can someone point me in the right direction. I have tried multiple IF statements combined with >39, >29, >19 but the function seems to halt when the first argument is completed.

    Very many thanks in advance!

    Paul

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Multiple If Statements with <>=

    hi Paul, try:
    =LOOKUP(F2,{0,13,20,30,40},{0,3,5,8,10})

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Multiple If Statements with <>=

    =if(f2>39,10,if(f2>29,8,if(f2>19,5,if(f2>12,3,0))))

  4. #4
    Registered User
    Join Date
    04-24-2007
    Posts
    32

    Re: Multiple If Statements with <>=

    Many thanks for the replies which are VERY helpful.

    Both suggested functions worked perfectly.

    =IF(F2>39,10,IF(F2>29,8,IF(F2>19,5,IF(F2>12,3,0)))) and =LOOKUP(F2,{0,13,20,30,40},{0,3,5,8,10})

    However my next "slight" problem is the fact that F2 (which is the result of a VLOOKUP function) can return the result #N/A sometimes and if possible I would like to have these display a different cell D2 if the value is #N/A.

    I tried with something like =IF(ISNA(F2),D2,H2) which did return the contents of D2 if F2 shows #N/A but I do not know how to incorporate both functions together?

    Is this possible?

    Thank you all again very much.

    Paul

  5. #5
    Registered User
    Join Date
    04-24-2007
    Posts
    32

    Re: Multiple If Statements with <>=

    Quote Originally Posted by pafranklin View Post
    Many thanks for the replies which are VERY helpful.

    Both suggested functions worked perfectly.

    =IF(F2>39,10,IF(F2>29,8,IF(F2>19,5,IF(F2>12,3,0)))) and =LOOKUP(F2,{0,13,20,30,40},{0,3,5,8,10})

    However my next "slight" problem is the fact that F2 (which is the result of a VLOOKUP function) can return the result #N/A sometimes and if possible I would like to have these display a different cell D2 if the value is #N/A.

    I tried with something like =IF(ISNA(F2),D2,H2) which did return the contents of D2 if F2 shows #N/A but I do not know how to incorporate both functions together?

    Is this possible?

    Thank you all again very much.

    Paul
    I wonder if anyone has any suggestions about how to combine these two functions please?
    Many thanks.
    Paul

  6. #6
    Registered User
    Join Date
    11-20-2012
    Location
    kettering england
    MS-Off Ver
    Excel 2000
    Posts
    15

    Re: Multiple If Statements with <>=

    start the formula if (f2="n/a",d2, if( and put in the rest

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Multiple If Statements with <>=

    Perhaps
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-24-2007
    Posts
    32

    Re: Multiple If Statements with <>=

    Quote Originally Posted by Pepe Le Mokko View Post
    Perhaps
    Please Login or Register  to view this content.
    This works perfectly thank you!
    Paul

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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