ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Decimal portion to a seperate cell??? (https://www.excelbanter.com/excel-programming/307575-decimal-portion-seperate-cell.html)

BrianG[_4_]

Decimal portion to a seperate cell???
 
I'm working on a template form where I would like to be able to sum a
column then post the whole number portion of the sum to one cell and the
decimal portion of the sum to another cell. How could this be
accomplished?

BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Norman Jones

Decimal portion to a seperate cell???
 
Try

=Int(A1)
= A1-Int(A1)


---
Regards,
Norman



"BrianG" wrote in message
...
I'm working on a template form where I would like to be able to sum a
column then post the whole number portion of the sum to one cell and the
decimal portion of the sum to another cell. How could this be
accomplished?

BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Tom Ogilvy

Decimal portion to a seperate cell???
 
=trunc(Sum(A1:A100))
=Sum(A1:A100)-Trunc(sum(A1:A100))

You could replace TRUNC with INT - they behave a little differently with
negative numbers. TRUNC gives me what I would expect (for this problem)
with a negative number.

--
Regards,
Tom Ogilvy

"BrianG" wrote in message
...
I'm working on a template form where I would like to be able to sum a
column then post the whole number portion of the sum to one cell and the
decimal portion of the sum to another cell. How could this be
accomplished?

BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Max Potters

Decimal portion to a seperate cell???
 
Hi Brian,

I tried the following in some cells.

cell A1: 456.79 (2 decimals)
cell A2: 321.54 (2 decimals)

then in cell B1, i putted the following formula, which returns the first 3
characters beginning from the right): =RIGHT(A1,3)
B2: =RIGHT(A2,3)
B4, i putted the total: = B1+B2

I tried to use the sum() statement, but (strangely) this doesnt work

Hope this helps

Regards
Max Potters


"BrianG" wrote in message
...
I'm working on a template form where I would like to be able to sum a
column then post the whole number portion of the sum to one cell and the
decimal portion of the sum to another cell. How could this be
accomplished?

BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 04:46 PM.

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