Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Limiting results of formula

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am trying to limit the results of a formula to a maximum value of 100. The basic formula looks like this:
    =(F19*G21)+(G19*G22)+(H19*G23)+I19

    If anyone can tell me what needs to be done to limit the result to a maximum of 100 that would be great!


  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-03 14:08, CBlues wrote:
    I am trying to limit the results of a formula to a maximum value of 100. The basic formula looks like this:
    =(F19*G21)+(G19*G22)+(H19*G23)+I19

    If anyone can tell me what needs to be done to limit the result to a maximum of 100 that would be great!

    Hi,

    Change the formula to:

    =MIN(100,(F19*G21)+(G19*G22)+(H19*G23)+I19)

    Bye,
    Jay

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    use and IF statement, ie:

    =IF(((F19*G21)+(G19*G22)+(H19*G23)+I19)>100,100,(F19*G21)+(G19*G22)+(H19*G23)+I19)

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    oh, Jay's formula is far better.

  5. #5
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi CBlues


    I would not suggest using such formulas without at least having some sort of flag as to which result is being returned. You may see 100 in the cell without realising the calculated formula is simply True for MIN(100)

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •