The Conservative Cave

The Help Desk => Computer Related Discussions & Questions => Topic started by: jinxmchue on March 12, 2009, 11:33:25 AM

Title: Any way to round up on all decimals in Works Spreadsheet?
Post by: jinxmchue on March 12, 2009, 11:33:25 AM
I don't want anything to round down.  For example, I'd like 2.13 to round up to 3 and not down to 2.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: Eupher on March 12, 2009, 03:20:57 PM
This is an Excel function - not sure if Works supports it:

=ROUNDUP(cell reference,0). This converts 21.3 to 22.

You could also use the ODD and EVEN functions.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: jinxmchue on March 14, 2009, 12:53:46 PM
Doesn't seem to be an equivalent function in Works Spreadsheet.  Yay, Microsquish!   :thatsright:
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: Texacon on March 14, 2009, 01:10:20 PM
Quote
Any way to round up on all decimals in Works Spreadsheet?

Have you tried to hire some really tiny cowboys?

 :-)

KC
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: DixieBelle on March 14, 2009, 01:21:34 PM
Have you tried to hire some really tiny cowboys?

 :-)

KC
:rofl: :rimshot:
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: Wineslob on March 16, 2009, 02:33:07 PM
Sounds like the scam from "Office Space".     :tongue:
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: rich_t on March 17, 2009, 12:26:30 AM
From the help file in MS Works:

Use ROUND(x,NumberOfPlaces)

What is the ROUND function?

The ROUND functiona built-in calculation that you can use to create a formula gives x rounded to the specified number of places to the left or right of the decimal point.
If NumberOfPlaces is positive, x is rounded to the number of decimal places to the right of the decimal point.

If NumberOfPlaces is 0, Works rounds to the nearest integer.

If NumberOfPlaces is negative, Works rounds to the number of places to the left of the decimal point. NumberOfPlaces performs operations on up to 14 decimal places, and Works displays up to 9.

Click the cellthe intersection of a row and column that can contain text or numbers where you want to use the function.
On the Tools menu, click Easy Calc.
Click Other.
Under Select a category, click Math and Trig.
In the Choose a function box, click ROUND(x,NumberOfPlaces).
Press Insert.
Follow the instructions on your screen.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: jinxmchue on March 17, 2009, 11:12:17 AM
Quote
If NumberOfPlaces is negative, Works rounds to the number of places to the left of the decimal point.

That's... confusing, but maybe it's what I'm looking for.  I'll try it.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: jinxmchue on March 17, 2009, 11:17:13 AM
Have you tried to hire some really tiny cowboys?

 :-)

KC

Rawhide!!!!
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: jinxmchue on March 19, 2009, 08:30:18 AM
Didn't work.  Microsoft sucks.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: Eupher on March 19, 2009, 08:35:58 AM
Been meaning to ask - Excel is practically everywhere these days. I believe it's a fairly standard option when buying a new computer.

Why no Excel?
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: LC EFA on March 19, 2009, 04:35:57 PM
Been meaning to ask - Excel is practically everywhere these days. I believe it's a fairly standard option when buying a new computer.

Why no Excel?

Many machines that are intended for the "home" market have the works package in lieu of the "ms office" package included with machines intended for business.

I believe this is due to the reduced OEM licensing costs to the distributer. 

Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: rich_t on March 19, 2009, 04:39:56 PM
My current PC (I bought it about a year ago) came with both Office and Works installed.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: GOP Congress on March 19, 2009, 09:02:13 PM
Back to your question at hand, let me preface everything by saying that this function works on Excel and Google Docs. I'm not sure if it works on Works (pun unintended), but I'm pretty sure it will as this is a basic spreadsheet function and requirement.

First of all, I understand that your requirement is to "round" all numbers with decimals fractions UP to the next integer. Please note that I actually used the term "round" based on your question. Technically, though, rounding has been defined as rounding either UP or DOWN, depending on which integral value was closer, up or down; with the halfway value rounded UP, even though technically it is the same distance from the lower integer value. To wit:

2.0 rounds to 2
2.01 rounds to 2
2.2 rounds to 2
2.49 rounds to 2
2.5 rounds to 3
2.8 rounds to 3

However, your question indicates that

2.0 "rounds" to 2
2.01 "rounds" to 3
2.2 "rounds" to 3
2.49 "rounds" to 3
2.5 "rounds" to 3
2.8 "rounds" to 3

That is the fundamental difference of the functions. In fact, the two excel / google docs formulas are as follows:

ROUND(number)

and

INT(number)

ROUND performs exactly in the first example; ie, rounding up or down, depending on how close it is to the upper or lower integer value.

INT, however, actually "truncates" the fraction off of the number, no matter how high it is. Therefore,

2.0 truncates to 2
2.01 truncates to 2
2.2 truncates to 2
2.49 truncates to 2
2.5 truncates to 2
2.8 truncates to 2

This is closer. At first glance, it appears that the problem is solved; just add 1 to the result and come up with the rounded number. But 2.0 should not have a number added. Therefore, we need to check to see if there is a fractional value present on the number. Therefore, we have to introduce one more function into the mix, the IF function.

Basically, the IF function evaluates an expression. If an expression is true, the function will process one statement. If the expression is false, then the function will process another statement.

Therefore, going back to the earlier numbers, let's check the expressions above

INT(2.0) = 2.0 evaluates to TRUE
INT(2.01) = 2.01 evaluates to FALSE
INT(2.2) = 2.2 evaluates to FALSE
INT(2.49) = 2.49 evaluates to FALSE
INT(2.5) = 2.5 evaluates to FALSE
INT(2.8) = 2.8 evaluates to FALSE

Now for the IF function. The format is like this:
IF("expression", "result if expression is true", "result if expression is false")

Here is the IF function in use. If the expression is true, the color is red. Otherwise, it's blue.

IF(INT(2.0) = 2.0, "RED", "BLUE")  evaluates to RED
IF(NT(2.01) = 2.01, "RED", "BLUE")  evaluates to BLUE
IF(NT(2.2) = 2.2, "RED", "BLUE")  evaluates to BLUE
IF(NT(2.49) = 2.49, "RED", "BLUE")  evaluates to BLUE
IF(NT(2.5) = 2.5, "RED", "BLUE")  evaluates to BLUE
IF(NT(2.8) = 2.8, "RED", "BLUE")  evaluates to BLUE

You can use mathematical functions as True / False statements as well. So to finish off (assume your number is located in cell A1):

IF(INT(A1) = A1, A1, A1+1) 

That should do the trick for you. Substitute A1 for other cell values.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: jinxmchue on March 20, 2009, 10:20:28 AM
Been meaning to ask - Excel is practically everywhere these days. I believe it's a fairly standard option when buying a new computer.

Why no Excel?

Because the computer is several years old and came with the MS spreadsheet.  It's nothing major or important.  I use spreadsheet for just one thing.  I was just curious if it was possible.
Title: Re: Any way to round up on all decimals in Works Spreadsheet?
Post by: Baruch Menachem on May 16, 2009, 03:17:59 PM
can you do something like round(number+.49)?

That way if you have anything that is over .o2 it will round up.  Which is good enough for Government Works.