ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Number rounding within a formula (https://www.excelbanter.com/excel-programming/343011-number-rounding-within-formula.html)

T.R. Young

Number rounding within a formula
 
Is it possible to round a number within a cell that contains a simple
formula? Here is what I want to do...

D108 contains a whole number. Sometimes it's odd, sometimes it's even.
In cell D109, I have the following formula;
=SUM(D108/2) (this is the cell that I want rounded up to the nearest whole)
In cell D110, I want to subtract D109 from D108.

I have tried simply editing the number format to display a number with no
decimal places, but this does not allow D110 to be accurate.
I know that I could simply place a calculation cell on the spreadsheet, then
make D109 simply have the roundup function for the calculation cell, but I
was wondering if it is possible to do the math AND the roundup in the same
cell.

Thanks!

--
"...I'm just a simple man, trying to make my way in the universe..."

Tom Ogilvy

Number rounding within a formula
 
first, using SUM does nothing additional and is unecessary

=D108/2

so
=round(D108/2,0)

--
Regards,
Tom Ogilvy



"T.R. Young" wrote in message
...
Is it possible to round a number within a cell that contains a simple
formula? Here is what I want to do...

D108 contains a whole number. Sometimes it's odd, sometimes it's even.
In cell D109, I have the following formula;
=SUM(D108/2) (this is the cell that I want rounded up to the nearest

whole)
In cell D110, I want to subtract D109 from D108.

I have tried simply editing the number format to display a number with no
decimal places, but this does not allow D110 to be accurate.
I know that I could simply place a calculation cell on the spreadsheet,

then
make D109 simply have the roundup function for the calculation cell, but I
was wondering if it is possible to do the math AND the roundup in the same
cell.

Thanks!

--
"...I'm just a simple man, trying to make my way in the universe..."




T.R. Young

Number rounding within a formula
 
Thank you much, Tom! I appreciate that. Obviously, I'm a newbie... :)
--
"...I''m just a simple man, trying to make my way in the universe..."


"Tom Ogilvy" wrote:

first, using SUM does nothing additional and is unecessary

=D108/2

so
=round(D108/2,0)

--
Regards,
Tom Ogilvy



"T.R. Young" wrote in message
...
Is it possible to round a number within a cell that contains a simple
formula? Here is what I want to do...

D108 contains a whole number. Sometimes it's odd, sometimes it's even.
In cell D109, I have the following formula;
=SUM(D108/2) (this is the cell that I want rounded up to the nearest

whole)
In cell D110, I want to subtract D109 from D108.

I have tried simply editing the number format to display a number with no
decimal places, but this does not allow D110 to be accurate.
I know that I could simply place a calculation cell on the spreadsheet,

then
make D109 simply have the roundup function for the calculation cell, but I
was wondering if it is possible to do the math AND the roundup in the same
cell.

Thanks!

--
"...I'm just a simple man, trying to make my way in the universe..."






All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com