+ Reply to Thread
Results 1 to 8 of 8

IF Statement question...

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    IF Statement question...

    Hi there,

    Am designing a timseheet spreadsheet and am finding myself a bit stuck on one issue, namely:

    In cell H35 of the spreadsheet will be displayed a number. If this number if 0-6.99 it should be displayed in the cell as "!!!", if it is 7-8 as "OK", if 8.01-10 as " OK ", and then anything above 10.01 as "!!!".

    This is fine, But I have one complicating factor, namely that if in Cell H27 is displayed the number 7.5 (and only 7.5), then in H35 should automatically be displayed "!!!".

    Any suggestions much appreciated!!

    Andy

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF Statement question...

    Try:

    =LOOKUP(H35,{0,7,7.5,7.51,10.01},{"!!!","OK","!!!","OK","!!!"})
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-31-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: IF Statement question...

    Thanks NVBC - that lookup statement is working fine, the problem is that the 7.5 which immediately discounts the value in H35 (and will display it automatically as a "!!!") is coming from another cell (H27)...

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF Statement question...

    Is that cell H27 showing the value rounded? Is it exactly 7.5?

  5. #5
    Registered User
    Join Date
    05-31-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: IF Statement question...

    Ah wait a minute, have realised an extra element...

    The lookup is fine, the 7.5 is an exact figure, BUT if there is a 7.5 in H27 and a 0 in H35, then the figure in H35 should display as "OK", if there is a 7.5 in H27 and any figure above 0 in H35 and it should be "!!!". If there is no 7.5 in H27, then the lookup is fine...

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF Statement question...

    perhaps:

    =IF(AND(H27=7.5,H35=0),"OK",LOOKUP(H35,{0,7,7.5,7.51,10.01},{"!!!","OK","!!!","OK","!!!"}))

  7. #7
    Registered User
    Join Date
    05-31-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: IF Statement question...

    Still a no go - again no worries with the lookup, its the 7.5 clause that is causing the problem. No matter - appreciate the effort!!

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF Statement question...

    Another attempt:

    =IF(H27=7.5,IF(H35=0,"OK","!!!"),LOOKUP(H35,{0,7,7.5,7.51,10.01},{"!!!","OK","!!!","OK","!!!"}))

+ 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