+ Reply to Thread
Results 1 to 7 of 7

Query on Logical Values

  1. #1
    Registered User
    Join Date
    04-01-2008
    Posts
    54

    Query on Logical Values

    Hi,

    I have a simple query

    I have to enter values between two percentages like

    If value is between 25% to 50% then it should calculate 0.5*.15*15% and If value is greater than 50% then it should calculate as 1*.15*15%

    I want this as one function

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Query on Logical Values

    =if(and(a1>=0.25,<=0.5),0.5*.15*15% ,if(a1>0.5,1*.15*15%,a1)

    i cant really read these

    0.5*.15*15% 1*.15*15%
    Last edited by martindwilson; 01-13-2010 at 09:20 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    01-10-2008
    Posts
    36

    Re: Query on Logical Values

    =IF(AND(A1>25,A1<50),0.5*0.15/100*15,IF(A1>50,1*0.15/100*15,"less than 25"))

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Query on Logical Values

    lian <50 wont work you'd need <50% but it does depend on wether op has actually used % in cell!

  5. #5
    Registered User
    Join Date
    01-10-2008
    Posts
    36

    Re: Query on Logical Values

    Hi Martin, if you use it without the percentage it works fine, otherwise just change it to

    =IF(AND(A1>25%,A1<50%),0.5*0.15/100*15,IF(A1>50%,1*0.15/100*15,"less than 25"))

  6. #6
    Registered User
    Join Date
    04-01-2008
    Posts
    54

    Re: Query on Logical Values

    It is not working

    Lets say A1 has Value 15% B1 has 0.15

    My condition is if I enter value between 25% to 50% in C1 then It should calcuate the value as 0.5*B1*c1

    And same as if the value which i enter in C1 is greater than 50% then it calculate as 1*b1*a1

    and if the value is below 25% then it should be 0

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Query on Logical Values

    lian it wont work! if you format a cell as % and type in 50 it displays 50% but the underlying value is 0.5
    thats what you have to test against. that why you either use 0.5 or 50% instead of just 50
    kamalthakur
    whats in the actual cells how are they formated, post a worksheet
    Last edited by martindwilson; 01-13-2010 at 09:34 AM.

+ 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