+ Reply to Thread
Results 1 to 6 of 6

If function problem ... not the wanted result

  1. #1
    Registered User
    Join Date
    04-29-2017
    Location
    Netherlands
    MS-Off Ver
    asus
    Posts
    7

    If function problem ... not the wanted result

    Hi everyone,

    Can someone help me out with the following formula?

    =IF(I3=0%<0.6%,-5,IF(I3=0.6%<0.8,-4,IF(I3=0.8%<1%,-3,IF(I3=1%<1.2%,-2,IF(I3=1.2%<1.4%,-1,IF(I3=1.4%<2%,0,IF(I3=2%<4%,1,IF(I3=4%<6%,2,IF(I3=6%<8%,3,IF(I3=8%<10%,4,IF(I3=10%>10%,5,0)))))))))))

    I keep getting 5 as result for all cells.

    This are the rules I applied for the if function formula. (see picture)
    If a cel with % is between xx% and xx% I want to label it with a number x for example.

    Capture.PNG


    hope someone can help me out!

    thank you in advance

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If function problem ... not the wanted result

    You probably need a VLOOKUP table rather than a series of IF conditions. However upload the workbook and manually add the results you expect explaining whichcells are the results and which original data.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,443

    Re: If function problem ... not the wanted result

    Hi,

    Does this help at all?

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: If function problem ... not the wanted result

    VLOOKUP will do what you want. in left column your%% from low to high, in right - numbers

  5. #5
    Registered User
    Join Date
    10-01-2012
    Location
    Noida, India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: If function problem ... not the wanted result

    I would suggest that reverse the IF sequence; I mean go from Highest to lowest

    https://www.youtube.com/excelissimple

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: If function problem ... not the wanted result

    OK, so you have a bunch of suggested "therapies", let's start with "diagnosis" or may be "post mortem" analysis .
    May be this will let you choose appropriate solution out of proposed.

    Your formula starts with first IF:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    how it is evaluated by Excel:
    first step:
    I3=0%
    it is False (almost always - unless I3 is 0 or empty, but probably there is some value, so as I said result is False)
    then as opposite to what our math teacher tried to teach us, excel evaluates
    False<0.6% (so result of first comparision is compared with 0.6%)
    as 0.6% is numerical value, Excel will convert left side also to mumerical value to do numerical comparition. And False is equivalent to mumerical 0
    so 0<0.6% is evaluared, and it is of course True.
    The true part of if is executed so the final result is always -5.

    If you would for some reason like to stick with your approach, you could start with:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    But note that in first IF you already checked that I3>=0.6% (it it was less, first condition would be true, so second and next ifs do not have to check lower limit:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope it gives some additional insight
    Best Regards,

    Kaper

+ 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. Lookup function does not work as wanted - see attachement
    By Peavey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-05-2013, 10:35 AM
  2. Replies: 1
    Last Post: 06-17-2012, 03:26 PM
  3. If function giving a 0 when a blank box is wanted
    By GrahamRoss in forum Excel General
    Replies: 1
    Last Post: 10-28-2011, 06:12 AM
  4. excel function wanted
    By sab128 in forum Excel General
    Replies: 2
    Last Post: 10-13-2010, 04:40 PM
  5. The right Formula to get result wanted
    By kaseyleigh in forum Excel General
    Replies: 1
    Last Post: 10-29-2009, 06:14 AM
  6. Problem with SUM function; won't display result.
    By Ellek in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-22-2008, 08:25 AM
  7. [SOLVED] Arranging rows function wanted
    By Tim in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-05-2006, 04:35 PM
  8. FORECAST function isnt producing wanted results
    By lsu-i-like in forum Excel General
    Replies: 4
    Last Post: 08-04-2005, 04:05 PM

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