+ Reply to Thread
Results 1 to 9 of 9

add 2 cells w/ 2 dec each, total=whole # except if answers is 2.9.

  1. #1
    SusanN
    Guest

    add 2 cells w/ 2 dec each, total=whole # except if answers is 2.9.

    need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    answers are between 2.96 - 2.99 range, does not want them to round up to
    whole #


  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Hello, SusanN:

    Assuming your two numbers are in A1:A2, use this formula:

    =IF(AND(SUM(A1:A2)>2.95,SUM(A1:A2)<3),SUM(A1:A2),ROUND(SUM(A1:A2),0))

    Format this cell as General:

    2.49 will return 2
    2.50 will return 3
    2.95 will return 3
    2.96 will return 2.96
    ...
    2.99 will return 2.99
    3.00 will return 3
    etc.

    HTH
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    JulieD
    Guest

    Re: add 2 cells w/ 2 dec each, total=whole # except if answers is 2.9.

    Hi Susan

    here's one option

    =IF(AND(A1+A2>=2.96,A1+A2<=2.99),A1+A2,ROUND(A1+A2,0))

    Cheers
    JulieD


    "SusanN" <[email protected]> wrote in message
    news:[email protected]...
    > need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    > answers are between 2.96 - 2.99 range, does not want them to round up to
    > whole #
    >




  4. #4
    Kassie
    Guest

    RE: add 2 cells w/ 2 dec each, total=whole # except if answers is 2.9.

    The correct formula would be to use "OR", and not "AND".

    =IF(OR(A1+A2>=2.96,A1+A2<=2.99),A1+A2,ROUND(A1+A2,0))



    "SusanN" wrote:

    > need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    > answers are between 2.96 - 2.99 range, does not want them to round up to
    > whole #
    >


  5. #5
    SusanN
    Guest

    RE: add 2 cells w/ 2 dec each, total=whole # except if answers is

    When I chgd it to "OR", if the answer is 3.2 it did not round it down to "3",
    it displayed 3.2. (using AND, it down round it down) Also, I noticed w/ AND
    or OR, if the answer was had 6 decimals it displayed that, not in 2 decimals.
    Is it possible to display 2 decimal answer w/in the range but round up/down
    outside the range?

    "Kassie" wrote:

    > The correct formula would be to use "OR", and not "AND".
    >
    > =IF(OR(A1+A2>=2.96,A1+A2<=2.99),A1+A2,ROUND(A1+A2,0))
    >
    >
    >
    > "SusanN" wrote:
    >
    > > need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    > > answers are between 2.96 - 2.99 range, does not want them to round up to
    > > whole #
    > >


  6. #6
    Kassie
    Guest

    RE: add 2 cells w/ 2 dec each, total=whole # except if answers is

    You are so right. Try this
    one:=IF(A1+A2<2.96,ROUND(A1+A2,0),IF(A1+A2>2.99,ROUND(A1+A2,0),A1+A2)). It
    MUST now work. To limit the number of decimals displayd, format the cell
    containing the formula as Number with 2 decimals.

    "SusanN" wrote:

    > When I chgd it to "OR", if the answer is 3.2 it did not round it down to "3",
    > it displayed 3.2. (using AND, it down round it down) Also, I noticed w/ AND
    > or OR, if the answer was had 6 decimals it displayed that, not in 2 decimals.
    > Is it possible to display 2 decimal answer w/in the range but round up/down
    > outside the range?
    >
    > "Kassie" wrote:
    >
    > > The correct formula would be to use "OR", and not "AND".
    > >
    > > =IF(OR(A1+A2>=2.96,A1+A2<=2.99),A1+A2,ROUND(A1+A2,0))
    > >
    > >
    > >
    > > "SusanN" wrote:
    > >
    > > > need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    > > > answers are between 2.96 - 2.99 range, does not want them to round up to
    > > > whole #
    > > >


  7. #7
    JulieD
    Guest

    Re: add 2 cells w/ 2 dec each, total=whole # except if answers is

    Hi Susan

    try
    =IF(AND(A1+A2>=2.96,A1+A2<=2.99),Round(A1+A2,2),ROUND(A1+A2,0))

    note i've suggested rounding it rather than changing the display - which
    just "hides" the extra decimals. Rounding it changes the value and if these
    values are used in other calcs you won't then get rounding errors.

    does this work for you?

    Cheers
    JulieD

    "SusanN" <[email protected]> wrote in message
    news:[email protected]...
    > When I chgd it to "OR", if the answer is 3.2 it did not round it down to
    > "3",
    > it displayed 3.2. (using AND, it down round it down) Also, I noticed w/
    > AND
    > or OR, if the answer was had 6 decimals it displayed that, not in 2
    > decimals.
    > Is it possible to display 2 decimal answer w/in the range but round
    > up/down
    > outside the range?
    >
    > "Kassie" wrote:
    >
    >> The correct formula would be to use "OR", and not "AND".
    >>
    >> =IF(OR(A1+A2>=2.96,A1+A2<=2.99),A1+A2,ROUND(A1+A2,0))
    >>
    >>
    >>
    >> "SusanN" wrote:
    >>
    >> > need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    >> > answers are between 2.96 - 2.99 range, does not want them to round up
    >> > to
    >> > whole #
    >> >




  8. #8
    SusanN
    Guest

    Re: add 2 cells w/ 2 dec each, total=whole # except if answers is

    Here is the formula we used,
    =IF(AND(J57+J59<3),ROUND(J57+J59,2),ROUND(J57+J59,0)) everything works for
    #'s less than 3.00 (they stay rounded to 2 decimals), but need for 3.xx or
    greater to round to 1 decimal place. Is this possible?

    "JulieD" wrote:

    > Hi Susan
    >
    > try
    > =IF(AND(A1+A2>=2.96,A1+A2<=2.99),Round(A1+A2,2),ROUND(A1+A2,0))
    >
    > note i've suggested rounding it rather than changing the display - which
    > just "hides" the extra decimals. Rounding it changes the value and if these
    > values are used in other calcs you won't then get rounding errors.
    >
    > does this work for you?
    >
    > Cheers
    > JulieD
    >
    > "SusanN" <[email protected]> wrote in message
    > news:[email protected]...
    > > When I chgd it to "OR", if the answer is 3.2 it did not round it down to
    > > "3",
    > > it displayed 3.2. (using AND, it down round it down) Also, I noticed w/
    > > AND
    > > or OR, if the answer was had 6 decimals it displayed that, not in 2
    > > decimals.
    > > Is it possible to display 2 decimal answer w/in the range but round
    > > up/down
    > > outside the range?
    > >
    > > "Kassie" wrote:
    > >
    > >> The correct formula would be to use "OR", and not "AND".
    > >>
    > >> =IF(OR(A1+A2>=2.96,A1+A2<=2.99),A1+A2,ROUND(A1+A2,0))
    > >>
    > >>
    > >>
    > >> "SusanN" wrote:
    > >>
    > >> > need a formula: 2 cells w/ 2 decimals each, total = whole # except if
    > >> > answers are between 2.96 - 2.99 range, does not want them to round up
    > >> > to
    > >> > whole #
    > >> >

    >
    >
    >


  9. #9
    swatsp0p
    Guest

    Re: add 2 cells w/ 2 dec each, total=whole # except if answers is

    Hello, SusanN:

    Assuming your two numbers are in A1:A2, use this formula:

    =IF(AND(SUM(A1:A2)>2.95,SUM(A1:A2)<3),SUM(A1:A2),ROUND(SUM(A1:A2),0))

    Format this cell as General:

    2.49 will return 2
    2.50 will return 3
    2.95 will return 3
    2.96 will return 2.96
    ....
    2.99 will return 2.99
    3.00 will return 3
    etc.

    HTH

    Bruce


+ 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