+ Reply to Thread
Results 1 to 11 of 11

Many Condition with IF Function

  1. #1
    Registered User
    Join Date
    02-15-2010
    Location
    India
    MS-Off Ver
    2007
    Posts
    17

    Question Many Condition with IF Function

    Hi All

    I want to create a formula which calculates the cell value based on another cells value.

    For Eg :-

    Please Login or Register  to view this content.
    I want to calculate the value based on the F2 Cell. So, suppose if F2 Cell is less than 5000, then the answer should be 5000*0.01%.
    If it is greater than 5000 but less than 10000, then 10000*0.01%.

    The same thing goes on with multiples of 5000. [IF greater than 10000 but less than 15000, then 15000*0.01%, IF greater than 15000 but less than 20000, then 20000*0.01% .........]

    If the figure in the cell F2 comes out as 50,000 or 1,00,000 then i will have to write many IF conditions
    Is there any way by which i can calculate without writing so many IF's ?
    Last edited by Aumkar; 07-30-2010 at 08:09 AM. Reason: Problem Solved

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Many Condition with IF Function

    Your operators are confusing - your formula says <= 10000 but your narrative says < 10000 ... which is it ?

    If we assume the narrative is correct then

    =(FLOOR(F2,5000)+5000)*0.1%

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Many Condition with IF Function

    Maybe =CEILING(F2,5000)*.01%

  4. #4
    Registered User
    Join Date
    02-15-2010
    Location
    India
    MS-Off Ver
    2007
    Posts
    17

    Re: Many Condition with IF Function

    Quote Originally Posted by DonkeyOte View Post
    Your operators are confusing - your formula says <= 10000 but your narrative says < 10000 ... which is it ?

    If we assume the narrative is correct then

    =(FLOOR(F2,5000)+5000)*0.1%
    Thanks for the reply. I forgot to add 'equal to' sign while narrating.
    So, what modifications to the above formula shall i make so that it takes into account the <= condition.

  5. #5
    Registered User
    Join Date
    02-15-2010
    Location
    India
    MS-Off Ver
    2007
    Posts
    17

    Re: Many Condition with IF Function

    Quote Originally Posted by arthurbr View Post
    Maybe =CEILING(F2,5000)*.01%
    Thanks, this works
    Last edited by Aumkar; 07-30-2010 at 08:04 AM.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Many Condition with IF Function

    Given the <= operator the CEILING formula you've been given does exactly what you ask.

    The formula takes the value in F2 and rounds up to next nearest multiple of 5000 - and then multiplies that final value by 0.01%

    Please test before disregarding based on interpretation.

  7. #7
    Registered User
    Join Date
    02-15-2010
    Location
    India
    MS-Off Ver
    2007
    Posts
    17

    Re: Many Condition with IF Function

    Sorry! I tested, but while writing the message here wrote something else.

    It was my mistake that i was not able to state the problem correctly in the last post. Pardon me.
    I was about to ask, what modification to the formula shall be made so that it takes into account the < condition and not <=.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Many Condition with IF Function

    see post # 2

  9. #9
    Registered User
    Join Date
    02-15-2010
    Location
    India
    MS-Off Ver
    2007
    Posts
    17

    Re: Many Condition with IF Function

    Hi
    I am looking for a formula which calculates value according to the following condition.
    Here is a rough formula of what i am looking for:-

    Please Login or Register  to view this content.
    The same thing goes on with multiples of 5000. [IF greater than 10000 but less than 15000, then 15000*0.01%, IF greater than 15000 but less than 20000, then 20000*0.01% .........]

    -Thanks

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Many Condition with IF Function

    yet again, see post # 2

  11. #11
    Registered User
    Join Date
    02-15-2010
    Location
    India
    MS-Off Ver
    2007
    Posts
    17

    Re: Many Condition with IF Function

    Thanks for both of the formula and sorry for asking the same question again and again

+ 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